next up previous contents
Next: trap: Trap signals Up: Miscellaneous Previous: A && B: A

set: Change Command-line Parameters

Typically, command line parameters are typed on the same line as the command. Those parameters may be replaced at any time using the set command:

#!/bin/sh
echo "Current parameters are $*."
set `date +%B`
echo "The current month is $1."

If there were no parameters on the command line, set would create the parameters.



Claude Cantin
Sun Sep 1 02:02:26 EDT 2002