Bash scripting
Jim
plug-discuss@lists.plug.phoenix.az.us
Mon, 29 Jul 2002 13:14:45 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Look at the shift command in Bash - it may be what you are looking for.
On Monday 29 July 2002 12:37, you wrote:
> Can anyone tell me how, in a bash script, I can move the contents of
> variable $2 to variable $1 and so on? I'm writing a bash script to
> update some stuff but I'd like to be able to type
> script.sh noblah noit nothat
> but everything is defaulted yes.
> Currently., my script is something like
> case "$1" in
> noblah)
> echo Not doing blah.
> $1="$2"
> ;;
> *)
> echo Doing blah;
> ;;
> esac
> case "$1" in
> nothis)
> echo Not doing this.
> $1="$2"
> ;;
> *)
> echo Doing this
> ;;
> esac
>
> That sort of thing. Can anyone help? Perhaps a nice online reference?
> No books though, I don't have the money or time to buy one.
>
> Thanks,
- --
Jim
Freedom is worth protecting
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
iQA/AwUBPUWiNysk3ywszI1FEQIdAwCfXi4Sn3pyATyV2rkfhMMq70c02poAoMlz
dnF8eMKklan9HK82GctNt1a2
=+g5v
-----END PGP SIGNATURE-----