Can someone please help me in clearing logic in case/esac statement?
by blason from LinuxQuestions.org on (#54A2R)
Hi All,
I am trying to write a script however stuck in my below issue and can someone please help me clearing my logic, pls?
I wanted to pass $1 and $2 flag with my script and need to take action accordingly
Here is my usage:
Quote:
now my command would be
Quote:
So I can write for $1 which is -u using case/esac but then I am sorry I have no clue about all | shopping parameter in $2.
How do I pass that?
TIA


I am trying to write a script however stuck in my below issue and can someone please help me clearing my logic, pls?
I wanted to pass $1 and $2 flag with my script and need to take action accordingly
Here is my usage:
Quote:
if [ $# -lt 3 ];then echo "Usage: $0 <command> <zones>" echo "command: " echo " -u : Update All Enabled Zones" echo " -l : list zones" echo " -i : Individual Update zones" echo "" echo "Zone names" echo " E.g. $0 -u all | $0 -i shopping" echo "" exit 0 fi |
Quote:
update -u all update -i shopping |
How do I pass that?
TIA