Hi,
Fri, 27 Oct 2006 Eric Blake wrote:
> According to Jim Easton on 10/27/2006 1:43 AM:
> > This suggests to me that it is executing that read in a subshell that
> > can't pass the variable back to its parent. This dispite the fact that
> > it appears to be the same process. (see inserted echo $
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to [EMAIL PROTECTED] on 10/27/2006 6:38 AM:
> Thanks Dave - I guess I should have explained in my original email that
> I'm converting a ksh script which currently runs successfully under
> HP-UX. If I run the following command under HP-UX ks
environment. This doesn't
happen under Cygwin pdksh, and I don't understand why.
Regards
Ian
- Original message -
From: "Dave Korn"
To: cygwin
Date: Fri, 27 Oct 2006 11:32:06 +0100
Subject: RE: Piping to the 'read' command
On 27 October 2006 04:04, [EMAIL PR
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Jim Easton on 10/27/2006 1:43 AM:
> Hi,
>
> Fri, 27 Oct 2006 Ian Taylor wrote:
>> Can anyone explain what is happening here (using pdksh as my shell) when
>> I try to set an environment variable using 'read':
This is one of the bash FAQs
On 27 October 2006 04:04, [EMAIL PROTECTED] wrote:
> Can anyone explain what is happening here (using pdksh as my shell) when
> I try to set an environment variable using 'read':
Variables set in a subshell process are not returned back into the parent
process environment.
>
> This works:
>
Hi,
Fri, 27 Oct 2006 Ian Taylor wrote:
> Can anyone explain what is happening here (using pdksh as my shell) when
> I try to set an environment variable using 'read':
...
>
> This doesn't work:
> $ echo Test2 | read VAR2
> $ echo "VAR2 is $VAR2"
> VAR2 is
>
> This works within the 'while' loop o
Can anyone explain what is happening here (using pdksh as my shell) when
I try to set an environment variable using 'read':
This works:
$ read VAR1
Test1
$ echo "VAR1 is $VAR1"
VAR1 is Test1
This doesn't work:
$ echo Test2 | read VAR2
$ echo "VAR2 is $VAR2"
VAR2 is
This works within the 'while'
7 matches
Mail list logo