Penguin

$IFS internal field separator

This variable determines how Bash recognizes fields, or word boundaries when it interprets character strings. $IFS defaults to whitespace (space, tab, and newline), but may be changed.

Have multiple characters as field separators.

  • IFS='[<listofchars>]'

Example using the read command:

  • IFS='[:=,]'; read foo bar moo car <<< '123:abc=345,def'; echo $foo $bar $moo $car