On 1/2/14, 2:35 PM, P Fudd wrote:
> Here's some more oddities:
>
> =failing.sh:
> #!/bin/bash
> R="1|2"
> IFS='|' read -r A B <<< $R
> echo A=$A, B=$B
>
> Expected: "A=1, B=2"
> Actual: "A=1 2, B="
This is a bug in bash-4.2. The expansion of $R is not supposed to be
subject to the value
On 1/2/14, 2:19 PM, P Fudd wrote:
> Hello all,
>
> I'm at my wit's end. This script is not working:
This comes up regularly. The last time was less than a month ago:
http://lists.gnu.org/archive/html/bug-bash/2013-12/msg00066.html
If you have the Bash FAQ, this is covered in question E4. Gre
On Thu, 2 Jan 2014 11:35:11 -0800, "P Fudd" wrote:
> Here's some more oddities:
Ok, the link I sent you is more about the issue you describe in your first
message. See below for more on the new ones in this message.
> =failing.sh:
> #!/bin/bash
> R="1|2"
> IFS='|' read -r A B <<< $R
> echo
On Thu, 2 Jan 2014 11:35:11 -0800, "P Fudd" wrote:
> Here's some more oddities:
>
> =failing.sh:
> #!/bin/bash
> R="1|2"
> IFS='|' read -r A B <<< $R
> echo A=$A, B=$B
>
> Expected: "A=1, B=2"
> Actual: "A=1 2, B="
>
>
> fail2.sh:
> #!/bin/bash
> R="1|2"
> while IFS='|' read -r A
Here's some more oddities:
=failing.sh:
#!/bin/bash
R="1|2"
IFS='|' read -r A B <<< $R
echo A=$A, B=$B
Expected: "A=1, B=2"
Actual: "A=1 2, B="
fail2.sh:
#!/bin/bash
R="1|2"
while IFS='|' read -r A B; do
echo 1:A=$A, B=$B
done <<< $R
echo 2:A=$A, B=$B
Expected:
1:A=1, B=2
2
Hello all,
I'm at my wit's end. This script is not working:
=
#!/bin/bash
B=none
echo "2" | while read -r A; do
B="$A"
echo 1.B=$B
done
echo 2.B=$B
==
The output, from GNU bash, version 4.2.25(1)-release
(x86_64-p