Script accept unlimited number of options.
Hi!
When you want the script to accept option you would do this something $1 right? For example for a 'called remove': #!/bin/bash rm -i $1 Then execute it to remove files: remove file file2 The script would remove the file given in the first option only right, so I add #!/bin/bash rm -i $1 $2 so that the script can remove the second file, but the process would be endless. How do I have the script to accept unlimited number of options? Thanks. |
The variable "$@" will contain all of the parameters passed to a bash script.
|
Thanks! I thought that I need to make some kind of loop for it! My script works now.
|
hello chii-chan..........
do u remember me.................i was the one who asked for the repair of gnome and u told me to remove all the gnome files.......now i have done it but nothing like u said happened ....like the gnome is not been recreated.............. i dont have a gui now .........pls help........... i am using rh9 |
Can you go back to the original post. I'll answer your question there.
|
All times are GMT -5. The time now is 07:52 AM. |