IFS and read (builtin)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dash 0.5.6.1

Try this:
echo foo:bar | ( IFS=: read foo bar; echo "$foo, $bar" )

It should print "foo, bar", but the IFS setting is ignored and we get
"foo:bar, ".

It works if you set the IFS globally before using read.

It does NOT seem to be a general issue about builtins not recognizing
leading name=value settings; for example the following works:
OLDPWD=foo cd -


On an unrelated note to prevent distraction, the command-grouping in
my first example is required because:
http://mywiki.wooledge.org/BashFAQ/024
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux