View Single Post
Old Jul 22nd, 2005, 10:26 AM   #3
levk
Newbie
 
Join Date: Jul 2005
Posts: 7
Rep Power: 0 levk is on a distinguished road
Thanks a lot, that worked; but now I have another problem: I need to execute the insides of the "if" if there was a particular argument or there were no arguments at all. Now it works for the particular arguments but givem me errors if I don't put any arguments; here's what my ifs look like:

if [ -z $1 -o "$1" = "unix" ]; then

And here's the error I'm getting:
bash-2.05$ ./logcollect.sh
./logcollect.sh: [: too many arguments
./logcollect.sh: [: too many arguments
./logcollect.sh: [: too many arguments
./logcollect.sh: [: too many arguments
./logcollect.sh: [: too many arguments
./logcollect.sh: [: too many arguments
./logcollect.sh: [: too many arguments
./logcollect.sh: [: too many arguments
./logcollect.sh: [: too many arguments
bash-2.05$

Thank you very much

Edit: it's one line for each "if" I have like that
levk is offline   Reply With Quote