#!/bin/ksh a=$$ echo $a
ddwh01-TEST ./Orange_Internal_Training> sh a1.sh 802874
ddwh01-TEST ./Orange_Internal_Training> sh a1.sh 1 2 618548 ddwh01-TEST ./Orange_Internal_Training> sh a1.sh 1 315612
$# Number of arguments to script $* Arguments to script $@ Original arguments to script $- Flags passed to shell $? Status of previous command $$ Process identification number $! PID of last background job $_ Last argument of the last command
$- Flags passed to shell
#!/bin/sh -v echo "flags are $-"
flags are himBH
$ ./x5 echo "flag is $-" + echo flag is vxh flag is vxh $ cat x5 #!/usr/bin/ksh set -vx echo "flag is $-"
$ ./x5 echo "flag is $-" flag is vh $ cat x5 #!/usr/bin/sh set -v echo "flag is $-"