[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug? Explanation??

From: Chet Ramey
Subject: Re: Bug? Explanation??
Date: Sat, 31 Dec 2016 12:06:00 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.6.0

On 12/30/16 11:07 PM, Grisha Levit wrote:
> On Fri, Dec 30, 2016 at 11:03 PM, PePa <address@hidden
> <mailto:address@hidden>> wrote:
>     r=23; echo $r; echo -e "r=bc\necho $r" |bash
> You need to escape the |$| in the second echo statement so that |$r| is not
> evaluated to |23| before being echoed.

The easiest way to see what bash gets on its standard input is to replace
`bash' in the pipeline with `cat'.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]