Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-22 00:22:43 +00:00
parent 9017f8acda
commit 716a67f83d
236 changed files with 290 additions and 289 deletions

View File

@@ -5,23 +5,23 @@ source: https://github.com/tldr-pages/tldr.git
---
# 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 IFS is a space, tab, and newline. The three characters serve as delimiters.
> `$IFS` (Internal Field Separator) is a special environment variable that defines the delimiter used for word splitting in Unix shells.
> The default value of `$IFS` is 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 IFS value:
- View the current `$IFS` value:
`echo "$IFS"`
- Change the IFS value:
- Change the `$IFS` value:
`IFS="{{:}}"`
- Reset IFS to default:
- Reset `$IFS` to default:
`IFS=$'
'`
- Temporarily change the IFS value in a subshell:
- Temporarily change the `$IFS` value in a subshell:
`(IFS="{{:}}"; echo "{{one:two:three}}")`