Reputation: 3
I am trying to copy few lines to another file .bashrc using shell script and cygwin terminal.The lines are :
echo "export DEVENVHOME=${DEVENVHOME:-$workarea/devenv.x}" >> .bashrc
I am writing command :
workarea="/home/WORKAREA" sh script1.sh
But the output on .bashrc is :
export DEVENVHOME=workarea/devenv.x
But i want the copy line
export DEVENVHOME=${DEVENVHOME:-$workarea/devenv.x}
in .bashrc where $workarea should be replaced by the workarea provided as argument on cygwin terminal.
Upvotes: 0
Views: 36
Reputation: 798814
Single quotes suppress substitution.
echo '...' >> ...
Upvotes: 1