Hi,
I am using hp unix
i want to know the use of the following commands
set --
set - variable
thanks
Hi,
I am using hp unix
i want to know the use of the following commands
set --
set - variable
thanks
HP-UX is an Operating System.
What version of HP-UX are you running?
uname -sr
What Shell are you using?
echo "${SHELL}"
The "set" command is described in the "man" page for your Shell.
If you have a modern HP-UX with the default Posix Shell see "man sh-posix".
unix version HP-UX B.11.23
shell ==> sh
this man sh-posix" has more details.. i need some example
From "man sh-posix".
- Turn off -x and -v options and stop examining arguments for
options.
-- Do not change any of the options; useful in setting
parameter 1 to a value beginning with -. If no arguments
follow this option, the positional parameters are unset.
Examples
set -x
# Script lines we want to debug
... lots of script lines ...
# Turn off debug
set -
# scriptname.sh
echo "Value is: $1"
set --
# Unset positional parameters $1 $2 etc.
echo "Value is: $1"
./scriptname,sh param1
Value is: param1
Value is: