On Tue, Oct 03, 2017 at 03:26:03AM +0000, McCue, Glenn (SSC/SPC) wrote:
> ## list arguments in the function call.
> echo "first_arg=$first_arg"
> echo "RESULT_A=\`doit \"\$first_arg\":2:3:4:\$PATH\'"
> OIFS=$IFS

What on EARTH is this nonsense?

Pass arguments to commands by quoting them properly.

myfunc "$arg1 "argument two" "${lotsofargs[@]}"

http://mywiki.wooledge.org/Quotes
http://mywiki.wooledge.org/BashFAQ/005

The content of IFS should be irrelevant for 95% of your script.  It
should only be used when you explicitly set it, e.g. for the duration
of a single read command.

IFS=: read -r user hash uid gid gecos home shell < /etc/passwd

http://mywiki.wooledge.org/IFS
http://mywiki.wooledge.org/Arguments

Reply via email to