Bash scripting

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Michelle Lowman
Date:  
Subject: Bash scripting
I was talking to the content editors at ittoolbox.com yesterday, and
they have a (fairly) new feature called Code Exchange. There's a section
specifically for Linux, although there isn't much in it yet. They would
be thrilled to get more submissions if anyone is interested.


On Wed, 2002-07-31 at 17:46, Digital Wokan wrote:
> $1=$(($2))
>
> On Monday 29 July 2002 12:37, Bryce C 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,
>
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss