Mail Archives: djgpp/2001/01/05/14:46:49
A shell-related question:
% echo '$BASE/foo/bar' > tmpfile
% cat tmpfile
$BASE/foo/bar
% export BASE=/home
% ls `cat tmpfile`
ls: $BASE/foo/bar: No such file or directory
% set `cat tmpfile`
% ls $@
ls: $BASE/foo/bar: No such file or directory
I've tried this (and *many* other variations which I
will not repeat here) with bash-2.04 under djgpp 2.03.
Is there some shell trickery to get the variable `$BASE'
(written as such in `tmpfile') to be expanded when it is
presented as the argument to `ls', `cd', etc?
--
TIA/jtw
- Raw text -