Shell Scripts

There have been a variety of UnixShells for a long time (see QuarterCenturyOfUnix).

During that long time, computers have increased in speed perhaps a millionfold. What was once way too slow is now done in the blink of an eye.

There are two major command interpreter code forks in Unix: the BourneShell and the CeeShell. Here's an example that will email all your files to someone else:

BourneShell: /bin/sh, ksh, bash, and others

 address=c2.7.CspamGarrod@SpamGourmet.com
 export address
 for i in *
 do
mail -s $i $address <$i
 done
CeeShell: csh, tcsh, and others
 setenv address c2.7.CspamGarrod@SpamGourmet.com
 foreach i ( * )
mail -s $i $address <$i
 end


CategoryUnix


EditText of this page (last edited August 23, 2007) or FindPage with title or text search