🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #66

Re: shell problems

#66
From: "Scented fads" Neilski
Date: Wed, 04 Nov 1992 11:28
20 lines
1172 bytes
dwhopkin@vela.acs.oakland.edu (Dave Hopkins) writes:

>>  2) How can I achieve nested command substitution , eg :
>>     cmd1 `cmd2 `cmd3 `cmd4 `...` ` ` ` ?
>>     I do not want to use pipe to achieve that, ie I don't want to say :
>>     cmdN | ... | cmd4 | cmd3 | cmd2 | cmd1

>This is possible if each nested backquote is quoted in a _nested_ manner.
>Example (in Bourne Sys V Shell):
>  echo `echo \`echo \\\`echo \\\\\\\`pwd\\\\\\\` \\\` \` `

Eurrgh.  Use a nice new shell such as zsh.

echo $(echo $(echo $(echo $(pwd))))

-- neilski

-- 
nrp@csug.cs.reading.ac.uk  \--------------------------------------------------
----------------------------\ Be obsequious, purple and clairvoyant.
Technical Details
Message-ID: <nrp.720876484@reading>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!reading!nrp
References: <1992Oct31.115106.552@latcs1.lat.oz.au> <dwhopkin.720837062@vela>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!reading!nrp
From: nrp@csug3.cs.reading.ac.uk ("Scented fads" Neilski)
Newsgroups: comp.unix.shell
Subject: Re: shell problems
Message-ID: <nrp.720876484@reading>
Date: 4 Nov 92 11:28:04 GMT
References: <1992Oct31.115106.552@latcs1.lat.oz.au> <dwhopkin.720837062@vela>
Sender: news@csug.cs.reading.ac.uk
Reply-To: nrp@csug.cs.reading.ac.uk
Organization: University of Reading
Lines: 20
Nntp-Posting-Host: angeles