I think my code posted in thread822-1386700 is a good example.
Personally I almost always use [tt]while[/tt] and [tt]shift[/tt] instead of [tt]for[/tt]. But if your shell has a [tt]getopts[/tt] built-in function, is better to use that.
I do not understand your example with the 7th parameter, but so far looks pointless to use [tt]shift[/tt].
It could be absolutely necessary if the given shell can only refer directly to the first 9 parameters. But I do not think this is actually the case of any recent shell version.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.