Hi,

I parse a files list ... and this list contains some files starting with a
tilde.
How can I get a tilde substitution for thoses files ?

ksh -c 'typeset FILE=~/.profile; if [[ ! -f $FILE ]]; then echo not found;
fi'
It's OK : tilde expansion

ksh -c 'typeset FILE="~/.profile"; if [[ ! -f $FILE ]]; then echo not
found; fi'
It's OK : no tilde expansion

ksh -c 'typeset FILE="~/.profile"; typeset EXPAND=$FILE; if [[ ! -f $EXPAND
]]; then echo not found; fi'

+ FILE='~/.profile'
+ typeset FILE
+ EXPAND='~/.profile'
+ typeset EXPAND
+ [[ ! -f '~/.profile' ]]
+ echo not found
not found

Version JM 93u+ 2012-02-29

Thanks and regards,

yves
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to