11

passing either of argument, not both in shell

view full story
linux-howto

http://www.unix.com – Hi, I have a requirement to work on script, it should take either of arguments. wrote it as below. Code: #!/bin/bash usage() {   echo "$0: missing argument OR invalid option !         Usage : $0 [-v][-h] -m|-r|-d } while getopts mrdvh opt; do   case "$opt" in       m)    monitor_flag=monitor;;       r)    report_flag=report;;       d)    delete_flag=delete;;       v)    verbose=True;;       h)    usage   &n (HowTos)