Peng Yu
2018-03-07 21:52:49 UTC
Hi,
When IFS=$'\t', `read` will not get empty fields like the one between
'a' and 'b c' below. Is there a way to allow it do so? Thanks.
IFS=$'\t' read -r -a a <<< $'a\t\tb c\td'
declare -p a
declare -a a=([0]="a" [1]="b c" [2]="d")
When IFS=$'\t', `read` will not get empty fields like the one between
'a' and 'b c' below. Is there a way to allow it do so? Thanks.
IFS=$'\t' read -r -a a <<< $'a\t\tb c\td'
declare -p a
declare -a a=([0]="a" [1]="b c" [2]="d")
--
Regards,
Peng
Regards,
Peng