expanding a variable in another
I have an script that it gets a command from the user. Sometimes I need to using a variable in the command. The variable is defined in a script, before it. like this:
#!/bin/bash
...
line=`echo $a|cut -d',' -f1`
...
and after run the script I answer this to a question:
Enter a command:/.../zm ... theAttr $line
This command should be used in a ssh,...
Now, when I echo the command it doesn't expand the $line. It echos $line rather than the amount of it!
|