<tt>$0</tt>: The Name of the Invoking Command



next up previous contents
Next: $1 $2 $3 Up: Parameters and the Previous: Parameters and the

$0: The Name of the Invoking Command

The special variable $0 represents the name of the executing program. The following shell, if called script.sh would output This program is called script.sh.:

    #!/bin/sh
    echo This program is called $0.
    exit 0



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