Wednesday, 14 August 2013

In bash script parameter tracking

In bash script parameter tracking

I have this command in bash:
cmd -c -s junk text.txt
If I change the command to
cmd -c junk -s text.txt
how to I keep track which parameter ($2 or $3) is set to junk?.
I try to use a for loop but I don't know how to find out junk from $@.

No comments:

Post a Comment