[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug? {1..3} doesnt' use IFS to separate fields
From: |
Linda Walsh |
Subject: |
bug? {1..3} doesnt' use IFS to separate fields |
Date: |
Mon, 25 Jul 2011 14:04:49 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
I know it wasn't designed this way, but it seems like it
is a bug.
If I do
read a b c <<<$(echo {1..3} ); echo "a:$a b:$b c:$c"
I get:
a:1 b:2 c:3
But If I do
export IFS=','; read a b c <<<$(echo {1..3} ); echo "a:$a b:$b c:$c"
I get:
a:1 2 3 b: c:
Why should the 2nd case return the wrong answer?
I.e. shouldn't {1..3} use the IFS to separate arguments?
- bug? {1..3} doesnt' use IFS to separate fields,
Linda Walsh <=