Is it possible to nest Csh command substitution?
Jonathan I. Kamens
jik at athena.mit.edu
Thu Jun 7 07:51:48 AEST 1990
In article <1990Jun6.082816.13649 at mentor.com>, cmorgan at mentor.com (Clark
Morgan @ APD x4813) writes:
|> [Is it possible to do nested command substitution in csh?]
No, I'm fairly certain it's not possible to do this. The traditional
way to get around it is to assign the result of the inner `` to a shell
variable, and then use that shell variable in the second ``, e.g.:
set foo = `echo stuff`
echo `$foo`
|> If this is a frequently asked/trivial question, please don't
|> post the answer, just send me e-mail.
I haven't seen it asked in a while, and it isn't in the FAQ posting,
but I have seen it asked before in this group, so perhaps it *should* be
in the FAQ posting :-).
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8495 Home: 617-782-0710
More information about the Comp.unix.questions
mailing list