Peper wrote:
Hello,
I have a var $blah=' `pwd`/blah ' (extra spaces for clearer reading), how can
i change it to 'output of pwd/blah' ?
I'm not quiet sure what you mean with "output of pwd/blah".
If you want to assign "/home/me/blah" (or whatever your current
directory is) you may use the environemnt variable $PWD and the
expression would read as:
blah=${PWD}/blah
If you insist to use the comand pwd you may write:
blah=`pwd`/blah or blah=$(pwd)/bla
If you want to assign the content of /home/me/blah to your variable use cat:
blah=`cat ${PWD}/blah` or blah=$(cat ${PWD}/blah)
Matthias
--
gentoo-user@gentoo.org mailing list