bash shell programming Hey,
I was writing a BASH shell program in xfce linux, and Ive run into a little problem.
My program name is prog and after i make the program executable with chmod, I type in the following on my command line:
prog $HOME *.
prog is my command, $HOME is to be used by the program as a string "$HOME", rather than the environment variable. Likewise for *, I want to use it as the string "*", rather than a wildcard.
The code for my program;prog; is as follows:
identifier=$1;
and to access the other variables i.e. *, I just use the shift command.
How do I quote the value of $1 in a way that the variable stored in $1 i.e. $HOME is treated as a string $HOME, rather than puting the value of my home directory into the variable identifier.
Thanks |