I'm curious about the bad writing in your homework assignment:
Quote:
Originally Posted by kmbl
This is the following exercise:
...
the second parameter is the name of a directory should be store
|
Did you do a sloppy job of retyping it into the forum? Or it was assigned in some other language and you didn't translate to English very well? Or the original assignment was that garbled?
Quote:
How can you refer to hte variables that represent the words passed in on the command line?
|
Where did your sample script come from? Did you write it?
You seem to be successfully using $# for the count of words on the command line and $1 for the first word (after the command itself). I assume you could have used $2 for the second word if you had wanted to and/or typed carefully.
So what is your question about "variables"?
Quote:
What kind of commands should I use in the terminal console?
I used #chmod u+x storeList.sh
#./storeList.sh
|
In the assignment itself that you quoted, you had
Quote:
i.e
# ./storeList.sh /etc etcFilesList
|
Did you not understand that is an example of the terminal command you would use to run your script?
You seem to have included almost all the answers to your possible questions in your own post. So it is very hard for me to guess what parts you don't understand.
BTW, my complaints about the quality of your typing and/or translation in the posting of your original assignment do not imply that a better job of quoting the original assignment would be acceptable. You should give us a better idea of which specific aspects of the assignment you understand or fail to understand. You should not expect anyone to do the assignment for you, just to explain specific aspects of it that you don't yet understand.