waspsoft.com


Home > Syntax Error > Bash Syntax Error End Of File Unexpected

Bash Syntax Error End Of File Unexpected

Contents

Please see the output below: $ ./a.sh ./a.sh: 3: ./a.sh: Host: not found ./a.sh: 4: ./a.sh: Port: not found Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface] [-m mark] [-M What type of sequences are escape sequences starting with "\033]" Is this safe to display MySQL query error in webpage if something went wrong? more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation run dos2unix file.sh then the problem will be fixed. http://waspsoft.com/syntax-error/bash-syntax-error-unexpected-end-of-file.html

Browse other questions tagged bash shell scripting or ask your own question. deadeyes View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by deadeyes 04-29-2010, 11:03 AM #3 catkin LQ 5k Club Registered: Dec 2008 Everything was working fine, but since yesterday I keep getting this error: ./spritz: line 176: syntax error: unexpected end of file I have checked the script file and everything seems perfect! grail View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by grail Thread Tools Show Printable Version Email this Page Search this Thread Advanced

Syntax Error Unexpected End Of File In Shell Script

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Here is what it looks like: [[email protected] me]$ ./trouble.bash + number=1 + '[' 1 = 1 ']' + echo 'Number equals 1' Number equals 1 Alternately, you can use the set Shotts, Jr.

Join them; it only takes a minute: Sign up Shell Script Syntax Error: Unexpected End of File up vote 8 down vote favorite 2 In the following script I get an Need to make sure the last EOF is not tabbed. How's the CMD trip bonuses from extra legs work? Bash Syntax Error Near Unexpected Token Newline Here's the code: #!/bin/bash # june 2011 if [ $# -lt 3 -o $# -gt 3 ]; then echo "Error...

Create a file called "tmp.sh" 3. Bash If Limit involving exponentials and arctangent without L'Hôpital what is the difference between \twocolumn and \documentclass[twocolumn]{book} Using Map to convert Feet + Inches to Inches in a List of Lists no outgoing Keep adding :) –Shobhit Puri May 14 '15 at 23:07 add a comment| up vote 5 down vote In my case, I found that placing a here document (like sqplus ... You can install dos2unix in ubuntu with this: sudo apt-get install dos2unix share|improve this answer answered Jun 16 '11 at 2:50 clyfish 4,98311822 thanks guys!

share|improve this answer answered Jun 16 '11 at 2:47 Adam Liss 34.3k1081122 add a comment| up vote 0 down vote Make sure the name of the directory in which the .sh Bash Syntax Error Redirection Unexpected Furthermore, instead of an else block that consists entirely of an if statement, you should use elif. How does the pilot control the Dassault Rafale? How does the pilot control the Dassault Rafale?

Bash If

asked 4 years ago viewed 84521 times active 1 month ago Linked 0 Error in script “Unexpected end of file” 123 How to check if running in Cygwin, Mac or Linux? Remember that the shell spends a lot of its life substituting text. Syntax Error Unexpected End Of File In Shell Script dos2ux file1 > file2 share|improve this answer answered Mar 11 at 13:27 patel8786 362 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up Bash Else If Why write an entire bash script in functions?

Convince people not to share their password with trusted others Subtraction with a negative result Does mean=mode imply a symmetric distribution? weblink more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed spectral norm of block-wise sums of matrices Did Donald Trump call Alicia Machado "Miss Piggy" and "Miss Housekeeping"? What are the canonical white spaces? Bash Syntax Error Near Unexpected Token

How does Gandalf get informed of Bilbo's 111st birthday party? If you ever got to execute this line, you'd see an error bash: fi: command not found. Run the file ("./tmp.sh") with no arguments 6. navigate here This is one reason you should test your scripts frequently when you are writing them so there is less new code to test.

A name for a well-informed person who is not believed? Syntax Error End Of File Unexpected (expecting Fi ) I accepted a counter offer and regret it: can I go back and contact the previous company? As it's currently written, it’s hard to tell exactly what you're asking.

Video displays in Star Wars What does an 'ü' mean?

Why does Windows show "This device can perform faster" notification if I connect it clumsily? Find More Posts by paulsm4 View Blog 04-29-2010, 02:58 PM #10 roxie600 LQ Newbie Registered: Apr 2010 Posts: 5 Original Poster Rep: Am still getting the end of file asked 1 year ago viewed 605 times active 1 year ago Related 5What is the purpose of each of the different UNIX/Linux shell startup files?2Shell command to remove files extension1How to Syntax Error End Of File Unexpected (expecting Done ) Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the

Why don't most major game engines use gifs for animated textures? I set the permissions to 777 and +x so it should work with the 'sh' command, right... catkin View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by catkin View Blog 04-29-2010, 11:20 AM #4 roxie600 LQ Newbie Registered: Apr his comment is here I am confused, I have an if statement at last and it looks correct!

To understand this error, we have to see what the shell sees. share|improve this answer answered Aug 23 at 19:49 Rafael Urena 6 add a comment| up vote 0 down vote Apparently, some versions of the shell can also emit this message when Did Donald Trump call Alicia Machado "Miss Piggy" and "Miss Housekeeping"? more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

Everything was working fine, but since yesterday I keep getting this error: ./spritz: line 176: syntax error: unexpected end of file I have checked the script file and everything seems perfect. How to deal with a very weak student? Usage: $0 host database username" exit 0 fi share|improve this answer edited Jun 16 '11 at 2:50 answered Jun 16 '11 at 2:39 aaronstacy 2,33833557 i still got the Thank you again. –Sam Jun 3 '12 at 18:28 Oh, I just noticed an error.