In most POSIX compliant shell like bash
. ksh
, dash
, mksh
, pdksh
, when variable assignment occur, field splitting and filename expansion (and brace expansion if the shell supports) are not performed in RHS of assignment:
$ IFS=/
$ a=1/2
# Field splitting and filename expansion turned off here
$ b=$a
$ IFS=
$ printf '%s\n' $b
1/2
Some shell's documentation (bash, ksh) mentioned about this, but POSIX documentation didn't.
I can see this behavior in most POSIX compliant shell, so I wonder is it portable since when POSIX documentation does not specify it?