Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

A. Building Blocks > The Command Line

The Command Line

Why is the command line so useful, especially in the Unix world? Why do all the Unix geeks get all misty eyed when they talk about it, and drool into their Birkenstocks? It goes back to the philosophy that the Unix creators built into the command line. They wanted a powerful set of tools that you could mix and match to form powerful composites. To that end, they built everything around a simple concept: streams of plain text. Virtually all the Unix command-line tools produce and consume plain text. Even text files can be converted into a stream of plain text (via the cat command) and put back into a file with the redirection command, the >.

For a simple example, you can take regular text with the echo command and pipe it through something that converts it from lowercase to uppercase (using the tr, or translate, command). This understands character classes (like :lower: and :upper:) like this (note that the $ isn’t part of the command, the command-line prompt, left there so you can tell input from output):


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint