9

Getopts option -please help

view full story
linux-howto

http://www.unix.com – Hello, I am using below code in AIX env to interpret -n option given in argument while executing the script .I want to give another argument -t Code: #!/bin/sh #set -x while getopts ":n:" opt; do     case "$opt" in         n)             host=$OPTARG             shift 2         ;;         *)             break         ;;     esac done echo "host = $host " (HowTos)