Quote:
Originally Posted by
wisecracker
Now this I would be interested in, please post an example ASAP.
I did? It is
set -- arg1 arg2 arg3 ... which sets the $1 $2 $3 variables.
If you run it like
set -- $variable it will split upon IFS, which is whatever you please, giving an easy way to split a string upon "." even in ancient shells which lack most modern string built-ins.
It works especially well in functions because otherwise you'd have to worry about overwriting the global $1 $2 etc, but inside a function you're only dealing with local ones, which will be gone soon anyway.