In our class scripting assignment, we need to pass any number of directories as positional parameters, and our script (in the end) will calculate, display, and save to file certain information about the directories passed as parameters. We in turn need to do several tests upon the name of the file we wish to save our results to.
My question is no doubt a simple one, I am wondering how I take the info stored in $@ and pass it to a variable that I can then use for all of the testing I need to do.
You can use a
forloop to iterate through the$@array as: