Bash: Iterate through $@ (easy++)
Excuse me for being such a newbie but, well this is the place for it right?
I've been reading the bash manpage, but can't make sense of the definition of "list". As such I don't understand how to iterate through the input parameters. I've tried variations on the following:
As an aside, is there a good site for beginners bash?
# first let it know which shell you're using.
for param in $@
You need the 'done' to 'close off' the 'do'. Putting the 'do' on a different line from the 'if' means that you don't have to put a ';' after the '$@', there are lots of these little things to learn.
2: type "bash tutorial" into google, there are lots of them.
Thanks Peter, much appreciated.
|All times are GMT -5. The time now is 01:59 AM.|