RE: Executing Shell Scripts
"Robert Pare" <[email protected]> Wed, 12 Feb 2003 14:10:19 -0500
| Newsgroups | gmane.linux.redhat.release.guinness |
|---|---|
| Organization | Cypher Systems Group |
| Message-ID | <[email protected]> |
You are a genius, you are my hero. That has saved me a lot of time. Much appreciated. Rob -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Taylor, ForrestX Sent: Wednesday, February 12, 2003 12:50 PM To: [email protected] Subject: Re: Executing Shell Scripts Robert Pare wrote: > > I have a shell script that I obtained on line to setup ipchains. I > can execute this script on my production box ( I just tried to test > it) but I can't run it on my text Linux box. Every time the script > tries to execute an IF statement, it returns "syntax error: unexpected > end of file". I am wondering if I am missing a package that > interprets this kind of stuff or if there is something I should be > including in my execute statement for this script. Any help would be > appreciated. First of all, see if it has been touched by windows. Open your script with vi `vi myscript`. Before you touch any keys, take a look at the bottom line. If it has the name of the file in quotes, and then [dos], the file has been touched by windows and must be repaired. Run dos2unix on it `dos2unix myscript`. If that is not the case, make sure that you have a 'fi' for every 'if'. Forrest -- _______________________________________________ Guinness-list mailing list [email protected] https://listman.redhat.com/mailman/listinfo/guinness-list