you could use IFS=',' to tokenize the csv line: $ echo 'a,b,c' | { declare -a line; IFS=',' read -ra line ; declare -p line; } declare -a line=([0]="a" [1]="b" [2]="c") additionally the case accepts a leading bracket, which is very practical ('h'|'help') ... ;;
you could use IFS=',' to tokenize the csv line:
$ echo 'a,b,c' | { declare -a line; IFS=',' read -ra line ; declare -p line; }
declare -a line=([0]="a" [1]="b" [2]="c")
additionally the case accepts a leading bracket, which is very practical
('h'|'help') ... ;;
Yep, that's true. Very good point!