Path: utzoo!attcan!uunet!decwrl!ucbvax!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: Is it possible to nest Csh command substitution? Message-ID: <1990Jun6.215148.9668@athena.mit.edu> Date: 6 Jun 90 21:51:48 GMT References: <1990Jun6.082816.13649@mentor.com> Sender: news@athena.mit.edu (News system) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Distribution: na Organization: Massachusetts Institute of Technology Lines: 22 In article <1990Jun6.082816.13649@mentor.com>, cmorgan@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710