Shells Handle Command Lines

% grep -n badhost *.log | mail -s "bad log entries" jan@foo.com
  • Shell is a program that runs other programs:
    1. Prints a prompt
    2. Waits
    3. Parses command line
    4. Runs command(s)
    5. Prints a prompt...
  • Redirects I/O: pipe joins standard output of one program to standard input of next
    % ls -l
    % ls -l | grep -v "^d"
    % ls -l | grep -v "^d" | cut -c32-
  • Substitution: variable ($), command (`...`), history (!, ^old^new^)
  • Families:
    • sh (Bourne), ksh (Korn), bash (Bourne Again)
    • csh (C), tcsh (Tcsh)
    • zsh, others
< previous  index  next >


Contact Jerry Peek