Variable substitition
Maarten Litmaath
maart at cs.vu.nl
Tue Dec 4 06:05:27 AEST 1990
In article <8393 at star.cs.vu.nl> I wrote:
)...
)# Instead of ``echo "$foo"'' you could use the portable echo hack:
)#
)# expr "$foo" : '\(.*\)'
Better make that:
expr "xxx$foo" : 'xxx\(.*\)'
Then you won't get ``expr: syntax error'' if $foo equals `match' or `+'
or `-' or... :-(
Grrrrr!
--
Q: "Is there a newsgroup for astrology/para-normal?"
A: "Why don't you consult the stars and find out ??"
-- Phil Watson <pwatson at sunb.mqcc.mq.oz.au>
More information about the Comp.unix.questions
mailing list