I've searched the archives of this group, but I couldn't find an
answer, so either it's dumb question or I'm using the wrong search
keywords.
I'm trying to create a bash script that takes as command line
parameters a bunch of variables and their values. Something like this:
Here's the 't' script:
#!/bin/sh
echo ${VAR}
And here's what I run
$ ./t VAR=4
I was hoping it would display "4", but it displays nothing. What do I
need to do to get the script to set VAR to 4? I guess I need to loop
through all the command-line parameters, and then "execute" each one,
but I don't know how to do that. Obviously, this could be a security
hole, but I'm not concerned about that. Any help is appreciated.