Bash expansion question

Chris plug.org at 2nerds.com
Wed Feb 18 13:07:21 MST 2009


Dear bash experts,

Observe:

bash$ echo $(echo "1:2")
1:2

bash$ echo $(echo "1,2")
1 2

There's no comma in the output of the second command; it's been
replaced by a space.

Which shell expansion mechanism replaces the comma with a space?

It looks kind of like brace expansion, but there are no braces.

The man page description of command-substitution mentions only
post-substitution word-splitting, but that depends on IFS (which in my
case is unset), so I presume the comma is not being used as a
potential word separator.

Thanks,
Chris



More information about the PLUG mailing list