i am trying to capture the return value of simple command:
i.e:
pwd
where can i find the relevant return value without stdout it to file?
Thanks koby
you can use `pwd`
for example:
$ setenv MY_PWD `pwd`
$ echo $MY_PWD
/my/current/path
MY_PWD=$(pwd)You can try `pwd`
ole@...:~$ echo `pwd`
/home/ole
ole@...:~$
echo `pwd`.The first question people should be asking is... what shell are you running this in?
$ MY_PWD=$(pwd) will work in sh-like.
I think the `pwd` will call a subshell, but again, depending on the shell, the syntax to set the output value to a variable will depend on your shell.
echo $SHELLsays ?