shell scripting issue
hey guys i'm trying to make a script that will run option 1 or 2 as i saw some tut's on the net i figured
that this should work but i get an error with that ... Code:
#!/bin/bash line 4: syntax error near unexpected token `"Yes"' line 4: `select yn "Yes" "No"; do' |
Hi,
Let's look at this example: Quote:
Quote:
Perhaps a look at the tutorial I consulted may help you... Good luck Thor |
thank you very much i will check it out right now :)
|
I don't get any errors from the output of your code?
Is this any help? Code:
#!/bin/bash |
I too copied your script and it seems to work without issue.
|
Quote:
Code:
choose something ... Note: Did you copy and paste or type the script? Try this: Code:
dos2unix scriptName.sh Refer to this document for details on dos2unix: http://linux.about.com/od/commands/l...l1_dos2uni.htm |
i still dont get it why my first script was wrong as i understood from you guys it should work ... :\
Thors helped me out with this but i'm still got question marks above my head.. :\ |
Hi,I copied your script and it seems to work without problem。What is the editor you are using?
|
tried emacs and vim...
got same result used sh script.sh or bash script.sh |
What is the output of
Code:
bash -x script.sh |
i'm trying 2 copy that using bash -x script.sh > scripterror.txt
but i get some "jeibrish" ( + the echo ) i got the clear command before echo but nothing special same error as before i can take out the 'clear' and make screen shot maybe u will see something i dont ... |
It would be enough if you could copy and paste the whole output here (using CODE tags). The output of
Code:
od -c script.sh |
All times are GMT -5. The time now is 04:23 AM. |