[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash "read" command seems to ignore piped input
From: |
Adolf Markl |
Subject: |
Re: Bash "read" command seems to ignore piped input |
Date: |
Thu, 29 Aug 2002 16:14:36 +0200 |
> echo "12 34 56" | read A B C
> echo $C $B $A
> expected return "56 34 12"
> actually returns nothing
But:
echo "12 34 56" | ( read A B C; echo $C $B $A )
gives the expected return "56 34 12"
Even more:
D=$(echo "12 34 56" | ( read A B C; echo $C $B $A )); echo $D
gives the expected return "56 34 12"
(BASH_VERSION='2.05b.0(3)-release')
Adolf Markl
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Bash "read" command seems to ignore piped input,
Adolf Markl <=