I have written a long script and part of it prints the values of the TERM, PATH and HOME Variables.
$Var1="$TERM"
echo "TERM $Var1"
$Var2="$PATH"
echo "PATH $Var2"
$Var3="$HOME"
echo "Home $Var3"
echo
However, in the script this is giving me this error:
userinfo.sh: line 55: =xterm: command not found
TERM
userinfo.sh: line 58: =/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/student/ch399/bin: No such file or directory
PATH
userinfo.sh: line 61: =/home/student/ch399: No such file or directory
Home
It is printing the values as I want it to, however it prints an error immediately afterwards. Any idea what is causing this?
Remove the
$from the initialization of the variables:Change :
to: