568 B
568 B
IFS
$IFS(Internal Field Separator) is a special environment variable that defines the delimiter used for word splitting in Unix shells. The default value of$IFSis a space, tab, and newline. The three characters serve as delimiters. More information: https://www.gnu.org/software/bash/manual/bash.html#Word-Splitting.
- View the current
$IFSvalue:
echo "$IFS"
- Change the
$IFSvalue:
IFS="{{:}}"
- Reset
$IFSto default:
IFS=$' \t\n'
- Temporarily change the
$IFSvalue in a subshell:
(IFS="{{:}}"; echo "{{one:two:three}}")