BASH script help
I am trying to grasp some basic BASH scripting, im getting a bit confused regarding variables.
This would assign the variable as uptime the print the uptime.
$3 hours, 15 minutes
Code:
VAR="uptime"
echo "Your computer has been on for $VAR"
I would expect this to output as follows:
$Your computer has been on for 3 hours, 15 minutes
However what I get is:
$Your computer has been on for uptime
Would I be right in saying $VAR is being read as a "string" and not as a "variable". If this is the case how do I change it to be read as a variable?
Intel Core 2 Duo 2x 2.33Ghz, FP-IN9 SLI mobo, 2Gb 800Mhz RAM, 256mb GeForce 7300 LE graphics, 120Gb IDE HD, 400Gb IDE HD,
Bookmarks