>       I remember a long time ago, I saw
>       somebody pass an argument to a script
>       from prompt.  As far as I remember, the
>       person was dialing different locations,
>       and didn't want to edit the script's
>       variable by editing the file every time
>       he wanted to dial.

Put this in a file

#!/bin/sh
echo "First arg is \"$1\"."
echo "Second arg is \"$2\"."
echo "All args are: \"$*\"."

And then run "chmod 770 myfile"

and then try ./myfile some command line args
and you should have enough to get going.

If you are coming from DOS, $1 is an analog for %1. There is no DOS
equivalent to the $* idiom, which is very handy for saying "pass everything
on the script's command line to another script/program whatever.

Running man bash will give you more secrets.

HTH,
DL


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to