sh: Input File Seperator

Two sample functions, the first with no arguments and the second with three arguments.

ScriptOutput
#!/bin/sh

echo "1: $@"
echo "2: $*"

IFS=','
echo "3: $@"
echo "4: $*"

IFS='|My Seperator...'
echo "5: $@"
echo "6: $*"

1: one two three four
2: one two three four
3: one two three four
4: one,two,three four
5: one two three four
6: one|two|three four

See Also: $*, $@


Roger
Roger Hall
COMPUSPEC
Google
 
Web Compuspec.net
Valid XHTML 1.0!
Valid CSS!