grep, awk, ps

I'm learning UNIX, the oldest computer network operating system. It was invented by a bunch of hackers at Bell Labs in the late 1960s, mostly because they wanted to play Space War on a DEC PDP-7. Quickly, however, UNIX creators Ken Thompson and Dennis Ritchie saw that their tough little O.S. could be useful for other purposes, and they installed it on some of the newer Bell Labs computers. By 1971, Thompson and Ritchie had penned the first UNIX manual, and Ritchie was well on his way to inventing the programming language C.

The rest is history: UNIX became the progenitor of many great operating systems, such as BSD, Solaris, and Linux. There are even some ideas from UNIX in Windows, and the latest Apple O.S. is built on top of it. UNIX is the infrastructure that makes the Internet run, and chances are it's probably lurking somewhere under the hood of your local computer network, too. The vocabulary and syntax of UNIX could be called the organizing principle of nearly every subsequent network operating system. New O.S.s are compared to UNIX. It's the model, the foundation.

You can think of UNIX as being like Latin or Greek, languages whose words and ideas have formed the basis for dozens of others: chunks of these classical languages show up in French, Italian, Spanish, English, German, and Russian. More important, Latin and Greek linguistic tools are still in use today. Although the Greeks and Romans didn't necessarily invent the philosophical treatise, the poem, the legal document, the sentence, or the epistle, Westerners often look back to the Latin and Greek versions of these forms as the first fully realized versions of certain basic things we do with language.

Charles likes to say, "I think that I shall never see a poem written in C." It's true that we don't use computer operating systems and languages in the same way we do a language like English. But in UNIX I have a basic tool kit that does things with data, often in sentences. You may address your shell program in UNIX thus: "grep annalee techsploitation | wc > cool_crap." This sentence says, "Find every line in the file "techsploitation" that has the set of letters "annalee" in it, send that information to a program that will count how many words there are in those lines, and store that program's results in a file called "cool_crap." Instead of manipulating language into a poem, you've converted it into abstract data. Either way, you're working in the realm of linguistic symbolism. And the kinds of tools and symbols that Thompson and Ritchie poured into UNIX are still in use today, even in the most sophisticated computer networks.

When I was learning basic UNIX vocabulary like rm, for "delete file," and ls, for "list all files in this directory," my teacher kept asking the class, "And why pick these letters to stand for these functions? Same reason why you get a different pizza every Friday." Then he would pause and cackle gleefully, "It's totally random! The pizza is different because it's a different Friday!" Obviously rm comes from the word remove, but as to why Ritchie chose rm instead of rv, well, it's just like the difference between pepperoni and linguica.

Ritchie explains on his Web site (www.bell-labs.com/history/unix) that he wrote the basic components of UNIX while his wife was on a one-month vacation. "I allocated a week each to the operating system, the shell, the editor, and the assembler to reproduce itself," he recalls. It's so weird to think that this language, which has helped create an entire communication system, was dreamed up so randomly -- a little hobby to keep somebody occupied while his spouse was away.

There's a certain amount of randomness involved in UNIX. Just as there is in English. Who knows why that pretty yellow flower got named "daisy"? Or why people have been naming their sons "Michael" for five millennia? The sounds are random. But their effects are not. Since we are at the dawn of its influence, who knows what kind of culture we'll create with our new language? What strange, sophisticated statements will come out of a linguistic toolbox containing ps, which allows you to look at all the processes the computer is running? Or awk, which breaks sentences into their constituent parts and reorganizes them, often admittedly to the puzzlement of everyone involved?

No Greek of the fifth century B.C., hanging out in the gymnasium, could have predicted the sprawling, random mess that is contemporary English and its culture. And yet I couldn't wish a better sort of future on UNIX and the networks it spawns.

Annalee Newitz (grep@techsploitation.com) is a surly media nerd who wants to pipe your output into somebody else's input. Her column also appears in Metro, Silicon Valley's weekly newspaper.

Enjoy this piece?

… then let us make a small request. AlterNet’s journalists work tirelessly to counter the traditional corporate media narrative. We’re here seven days a week, 365 days a year. And we’re proud to say that we’ve been bringing you the real, unfiltered news for 20 years—longer than any other progressive news site on the Internet.

It’s through the generosity of our supporters that we’re able to share with you all the underreported news you need to know. Independent journalism is increasingly imperiled; ads alone can’t pay our bills. AlterNet counts on readers like you to support our coverage. Did you enjoy content from David Cay Johnston, Common Dreams, Raw Story and Robert Reich? Opinion from Salon and Jim Hightower? Analysis by The Conversation? Then join the hundreds of readers who have supported AlterNet this year.

Every reader contribution, whatever the amount, makes a tremendous difference. Help ensure AlterNet remains independent long into the future. Support progressive journalism with a one-time contribution to AlterNet, or click here to become a subscriber. Thank you. Click here to donate by check.

Close
alternet logo

Tough Times

Demand honest news. Help support AlterNet and our mission to keep you informed during this crisis.