Re: Re: Stupid shell script question about "read" [SOLVED]

2006-03-22 Thread Neal Murphy
Kevin, Looking for a solution to *my* problem (strange networking problem with debian testing), I saw your post and thought I'd respond. > # set some variables to nightmarish values for testing purposes > d='"ab\""q"' # literal value is "ab\""q" > e='$d' # literal v

Re: Stupid shell script question about "read" [SOLVED]

2006-03-03 Thread Kevin B. McCarty
I wrote: > Could someone tell me why the following works in zsh but not in > bash/posh/dash? > > benjo[3]:~% echo foo bar baz | read a b c > benjo[4]:~% echo $a $b $c > foo bar baz Thanks everyone for the enlightening answers! So just to summarize, the problem is that the pipeline is treated a

Re: Stupid shell script question about "read"

2006-03-02 Thread Bill Marcum
On Thu, Mar 02, 2006 at 10:23:20AM -0500, Kevin B. McCarty wrote: > Hi list, > > Could someone tell me why the following works in zsh but not in > bash/posh/dash? > > benjo[3]:~% echo foo bar baz | read a b c > benjo[4]:~% echo $a $b $c > foo bar baz > > If I try the same with bash (or other sh-

Re: Stupid shell script question about "read"

2006-03-02 Thread Alfredo Finelli
On Thursday 02 March 2006 16:23, Kevin B. McCarty wrote: > Hi list, > > Could someone tell me why the following works in zsh but not in > bash/posh/dash? > > benjo[3]:~% echo foo bar baz | read a b c > benjo[4]:~% echo $a $b $c > foo bar baz > > If I try the same with bash (or other sh-compatible s

Re: Stupid shell script question about "read"

2006-03-02 Thread Andrew Cady
On Thu, Mar 02, 2006 at 10:23:20AM -0500, Kevin B. McCarty wrote: > Hi list, > > Could someone tell me why the following works in zsh but not in > bash/posh/dash? > > benjo[3]:~% echo foo bar baz | read a b c > benjo[4]:~% echo $a $b $c > foo bar baz > > If I try the same with bash (or other sh-

Re: Stupid shell script question about "read"

2006-03-02 Thread Almut Behrens
On Thu, Mar 02, 2006 at 09:19:02AM -0800, David Kirchner wrote: > On 3/2/06, Kevin B. McCarty <[EMAIL PROTECTED]> wrote: > > Hi list, > > > > Could someone tell me why the following works in zsh but not in > > bash/posh/dash? > > > > benjo[3]:~% echo foo bar baz | read a b c > > benjo[4]:~% echo $a

Re: Stupid shell script question about "read"

2006-03-02 Thread Joerg M. Sigle
Hi, Kevin. I don't have a solution, but I found that interesting, so did some experiments: $ bash --version bash --version GNU bash, version 3.1.0(1)-release (i486-pc-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. $ echo foo | read a; echo $a returns empty variable a whole lot of

Re: Stupid shell script question about "read"

2006-03-02 Thread David Kirchner
On 3/2/06, Kevin B. McCarty <[EMAIL PROTECTED]> wrote: > Hi list, > > Could someone tell me why the following works in zsh but not in > bash/posh/dash? > > benjo[3]:~% echo foo bar baz | read a b c > benjo[4]:~% echo $a $b $c > foo bar baz > > If I try the same with bash (or other sh-compatible she

Stupid shell script question about "read"

2006-03-02 Thread Kevin B. McCarty
Hi list, Could someone tell me why the following works in zsh but not in bash/posh/dash? benjo[3]:~% echo foo bar baz | read a b c benjo[4]:~% echo $a $b $c foo bar baz If I try the same with bash (or other sh-compatible shells), the variables $a $b and $c are unset. From the bash man page: >