[lug] Shell Script
petek at bsod.net
Sun Aug 27 20:50:12 MDT 2000
Date: Fri, 25 Aug 2000 10:40:34 -0600
From: Bob Collins <bcollins at csd.net>
Subject: [lug] Shell Script
This is called a "here" redirect and it means that when whatever is
contained on all lines in the rest of the script up until that expression
is encountered on a line by itelf is passed to the encountered command
on standard input. Thus...
shows "Random Text" on standard output because cat takes standard input
and gives it to standard output.
In your case, it's starting the MySQL command interface and handing it a
query, which MySQL runs and shows on standard output. It takes the first
argument to the script (in $1) and looks for a first name, last name,
email and interest where the interest has the command line argument in it.
It then displays those results on the screen.
petek at bsod dot net or pkrawczy at uiuc dot edu
Finger pkrawczy at uiuc dot edu for PGP public key
More information about the LUG