IFS
Internal Field Separator used for shell word splitting.
Syntax
$echo "$IFS"
Examples
Examples
$oldIFS=$IFS; IFS=','; set -- $line; IFS=$oldIFS
Examples
$while IFS= read -r line; do ...; done < file.txt
Warnings
Always restore IFS changes to avoid side effects in scripts.
Typical use cases
Note
Controls how the shell splits strings into fields.
Export