Timeline for Reading a file with IFS loop works only when no arrays are used
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 11, 2020 at 14:16 | history | edited | CommunityBot | Commonmark migration | |
| Jun 29, 2016 at 20:23 | comment | added | Jeff Schaller♦ | @coffeeMug - as with the OP's symptom "it doesn't even enter the loop", I see it exiting the while loop with RC=1 after the first attempted += assignment, so the echo is not even executed. See more by putting the commands in a file and running it with bash -x thatfile | |
| Jun 29, 2016 at 20:21 | vote | accept | Luis E | ||
| Jun 29, 2016 at 19:48 | comment | added | jimmij | @coffeMug That's a little mystery to me. It seems that trying to override GROUPS kills the rest of the entire command line: GROUPS=(); echo test gives nothing and exit code 1. Similarly GROUPS=("$(echo test >/dev/tty)") | |
| Jun 29, 2016 at 19:34 | comment | added | Vombat | Why echo command does not print anything? | |
| Jun 29, 2016 at 19:32 | history | edited | Jeff Schaller♦ | CC BY-SA 3.0 | added 89 characters in body |
| Jun 29, 2016 at 19:30 | history | answered | jimmij | CC BY-SA 3.0 |