Cookie Notice

As far as I know, and as far as I remember, nothing in this page does anything with Cookies.


My Song of Love for Unix

My first computer was a DOS-running TRS-80 in the 1980s. In 1988, when I was heading off to college, my parents got me a Tandy PC with an 8088 processor and a green monochrome monitor that took a composite video cable. I still have it but I don't use it. The only modification I did on it was to add a modem (2400 baud, I think, but maybe 1200 baud) and I mostly used it to connect to BBSes and mostly to the campus' big machine, MUSIC (Multi-User System for Interactive Computing). I know I touched some GNU tools for DOS at the time, and I heard about UNIX systems and felt an awe about them that I don't think it's possible to express these days, when you can download Linux for free and all of Apple's computers run BSD, but I never got close to a real UNIX system back then.

In fact, the first I really touched a Unix system was when I went to school again, to get my Computer Science degree. I learned C as a subset of C++ on SunOS systems, and I have to say that I was somewhat underwhelmed with Unix. X looked positively crufty compared to Windows 95, much less MacOS, even in 1996. What I didn't get, what it took me a while to get, is that the windows don't really matter. Once you get into the Unix mindset, CDE is KDE is Gnome is Windows is MacOS. The way windowing doesn't matter, and what does matter is the command line.

And why is that? Windows has CMD and now Powershell, and Macs could be coerced to give you a prompt even back then, even if few people used them. What makes Unix systems different? In a word, pipes.


So, you have an MP3 of a song, somewhere in your music collection. For example, "Never Ending Love" by Delaney and Bonnie. You don't know where it is and you want to copy it to your phone. So, first you have to go through your music collection.

find Music/.

That gives you a big list of all your music. tl;dr

find Music/. | grep -i delaney

OK, so, that gives you the whole album, plus "Delaney's Dream" by Seth Austin, too.

find Music/. | grep -i delaney | grep -i "never ending"

And, if your music collection is mine, that cuts it down to two. And a great many other problems can be broken down in similar ways.

It gets deeper, but in essence, the command line, the basic way you connect with a machine, is a programming language in and of itself. You write small things that filter the information, learn the flags to control the output of the tools, and only display it when it is down to what you need to see. To the extent it is possible to script a windowing system, it is a cast-iron PITA. When you want to script things in the command line, it is baked in at a fundamental level.

So, if someone suggests you learn Unix, yeah, it's great to run Ubuntu and get the Unity shell (the current term for window manager, I guess), but you'll either be using things that are ported to all the platforms (Chrome, Firefox, Komodo Edit, in my case), things that are equivalent to things on other platforms (Nautilus vs Windows Explorer, for example) or things that are hoped to be equivalent to things on other platforms but just aren't (GIMP vs Photoshop). This makes Mac vs PC vs Linux largely a matter of taste, but the command line, or shell, is the thing that makes Unix different, that makes it powerful, which makes it powerful and user-friendly to those who it excepts as users.

Yes, I have just largely restated Neal Stephenson's "In the Beginning was the Command Line". I still enjoyed the trip, and hope you did too.

No comments:

Post a Comment