<tt>set</tt>: Change Command-line Parameters



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

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 with the set command:

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

Or, if there were no parameters on the commands line, set would create the parameters.



Super-User
Fri Feb 17 15:55:40 EST 1995