This may seem like a silly question, but I’ve looked high and low for a solution and have not come up with one. I have a script that accepts a number of arguments and I simply wish to know how to have one argument and access the next immediate argument. I’ve tried stuff like $i+1 with no avail. This next argument will end up holding a destination directory, so I need to be able to access the contents. Also note that I am getting the argument position through a counter variable iterated in a loop, which is why I can’t simply say $2 or something. I apologize for such a mundane question.
This may seem like a silly question, but I’ve looked high and low for
Share
1 Answer