Useful Intermediate Shell Stuff  


I am not a major league Unix hack, far from it, in fact. This material describes my current (probably occasionally flawed) understanding of some of the more advanced features of Unix that I personally seem to use most frequently.  As such, it represents a rough judgment as to a useful  next level of Unix shell familiarity.  Almost all of this material is probably included in the man pages for the shell (try  man tcsh) but there's way too much other stuff  there for a comfortable next step and no notion of priority, utility, or importance.  These topics below at least have some personal evaluation behind their selection.   I've put a very rough and highly subjective utility rating in parentheses after each topic:  1 seems to me to be more likely to be immediately useful than 2, and so on.   If you have suggestions for omitted topics that you believe might be more useful or important than the ones I've covered, email me and let me know --- the same for any mistakes you spot here.  When you want more, and there's lots more (a Unix shell is an extremely sophisticated tool in its own right), check one of the other online sources for Unix information.  Topics discussed briefly here include:




If file completion has not been set for you by default when your account was created (possibly in the original or default .login or .cshrc files the system administrator created for you), enter set filec in response to a shell prompt.  Then edit your .cshrc file and put it there too so it's automatic next time you log on.


The Esc  key (an abbreviation for "escape", I'll explain why in a second) is usually at the extreme upper left  position of the keyboard.  Esc sends a non-printing character code to the shell (or whatever other program you're typing keyboard input to).  "non-printing"  means the keyboard sends in a unique numeric code all right but one that doesn't correspond to any of the normally visible (printable) characters like a, b, c, ... X, Y, Z, 0, 1, 2, etc.  So the shell won't "echo" any obvious display code back to the CRT.  Thus Esc is said to be a non-printable character --- it has it's own unique standard code but it doesn't have a standard print or display symbol normally associated with it.

Often, the Esc code itself is used to indicate the start of a series of other codes that are to have a special meaning, different from their usual.  The left arrow key on my keyboard, for example, does not send a single unique code.  Instead it sends the Esc code followed by the code for the letter 'O' and then the code for 'D'.  If the Esc code were not sent first, the receiving program might just display OD.  Instead, receiving EscOD, it will move the cursor one place to the left.  Thus Esc tells the receiving program to "escape" from the normal processing of the subsequent codes.

(grep stands for "get regular expression"; see wild cards for a partial discussion of regular expressions in Unix.)

Pretty cool, no?

alias cool "loquacious_program | grep Z??A | sort | more" 

and remember to put that alias definition in your .cshrc file.





This page last modified on 15 May 1998 by Dr. M.S. Jaffe