Re: [PATCH] Use perl instead of tac
- From
Brian Gernhardt <benji@silverinsanity.com>
- Date
- Apr 30, 2008, 16:12 UTC
- Message-ID
- <728C10C4-D51E-4FDD-BD15-B99882E10500@silverinsanity.com>
- In-Reply-To
- <20080430093950.GA16806@alea.gnuu.de>
On Apr 30, 2008, at 5:39 AM, Jörg Sommer wrote:
Show 16 quoted lines
> … but I found the problem. I don't know how to pass the list from one
> subshell to the other.
>
> % { echo pick; echo merge; a=12 } | { echo +$a+; while read line; do
> echo $line; done; }
> ++
> pick
> merge
>
> The only idea I have is a file. Do you have a better idea?
>
> % { echo pick; echo merge; a=12 } >/tmp/tmp; \
> { echo +$a+; while read line; do echo $line; done; } < /tmp/tmp
> +12+
> pick
> mergeNo, I don't. But I think the resulting code will be easier to read, even with the file.
~~ Brian