Home > Syntax Error > Syntax Error End Of File Unexpected

Syntax Error End Of File Unexpected

Contents

Shotts, Jr. Anxious about riding in traffic after 20 year absence from cycling A pilot's messages How do I reassure myself that I am a worthy candidate for a tenure-track position, when department 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 Thanks a lot for You outstanding help. navigate here

share|improve this answer edited Jun 3 '12 at 14:51 answered Jun 3 '12 at 13:33 Gilles 33.6k683126 [[ $3 < 50 ]] compares $3 with 50 lexicographically, so if It is useful to know that program flow is happening the way we expect. Resubmitting elsewhere without any key change when a paper is rejected Understanding the grammar: «illis Evangelii nuntiandi praebens mandatum» What are the ground and flight requirements for high performance endorsement? Regards, Adrian Remove advertisements Sponsored Links jedzio View Public Profile Find all posts by jedzio #2 07-31-2014 Don Cragun Administrator Join Date: Jul 2012

Syntax Error: Unexpected End Of File Bash

Either use the numeric comparison operator -lt, or use an arithmetic instruction (( … )). Missing quotes Edit line 6 to remove the trailing quote from the end of the line: echo "Number equals 1 and run the script again. 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

Since you use bash features, the first line of the file must be #!/bin/bash or #!/usr/bin/env bash. Is the partition function of non-conformal theories on a torus modular invariant? When I delete this section, my script works good. Java Syntax Error: End Of File Unexpected (expecting ")") It felt so wrong to have un-indented code in the block, but it's absolutely necessary. –Zeal Jul 6 at 17:50 add a comment| up vote 2 down vote echo"==================PS COMMAND SNAPSHOT=============================================================="

current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Bash Unexpected End Of File While Looking For Matching You can use cat -vet scriptname to check (look for "^M$" at the ends of lines, instead of just "$"). –Gordon Davisson Jun 17 '15 at 6:29 On a French vs Italian resistance Bounce off the atmosphere at reentry? Help Forums Forums Quick Links Search Forums Recent Posts Resources Resources Quick Links Search Resources Most Active Authors Members Members Quick Links Notable Members Current Visitors Recent Activity New Profile Posts

Unix & Linux Stack Exchange works best with JavaScript enabled This tutorial has been deprecated! Syntax Error Near Unexpected Token `fi' Use echo commands to verify your assumptions. Thanks! –user55570 Jun 17 '15 at 22:35 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign To understand this error, we have to see what the shell sees.

Bash Unexpected End Of File While Looking For Matching

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 The best way to spot these is to use correct indentation, which will show you where you have a broken control structure, and syntax highlighting, which will show you where quotes Syntax Error: Unexpected End Of File Bash Isolating problems Finding bugs in your programs can sometimes be very difficult and frustrating. Syntax Error Unexpected End Of Input 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

Contact Us Advertising Positioningby Digital Point Terms and Rules Forum software by XenForo™ ©2010-2015 XenForo Ltd. check over here Regards, Adrian Jedrzejewski jedzio View Public Profile Find all posts by jedzio

#4 07-31-2014 Don Cragun Administrator Join Date: Jul Forum Operations by The UNIX and Linux Forums I agree with camh, that correct indentation from the beginning helps to avoid such errors. Syntax Error At Line (' Unexpected

grep "fi " cldtest.sh only reveals 3 matching fi statements. What are the advantages of doing accounting on your personal finances? It also explains the rest of the error message we received. http://allconverter.net/syntax-error/syntax-error-unexpected-end-of-file-ruby.html For example.: #!/bin/bash number=1 set -x if [ $number = "1" ]; then echo "Number equals 1" else echo "Number does not equal 1" fi set +x Previous | Contents |

In this particular case, I can see you are missing a fi. Shell Script Validator Please accept my apologies, but I am really nooby in sh scripts. I haven't reviewed your logic.

The single bracket construct is an ordinary built-in command, so special characters such as < retain their normal meaning.

the sum of consecutive odd numbers Complimenting the author of a textbook A pilot's messages Why would a NES game use an undocumented 1-byte or 2-byte NOP in production? Stay logged in Linux.org Forums > LINUX.ORG Home Home Quick Links Recent Activity What's New? Fixed by running dos2unix on the script, with proper description of problem and solution given in that answer share|improve this answer answered Feb 6 '15 at 9:47 shtolik 426922 add a Unexpected Eof While Looking For Matching `"' Can a free radical be created by chemical reaction of non-radical species?

asked 4 years ago viewed 14439 times active 4 years ago Related 0Bash script throws “syntax error near unexpected token `}'” when run0line 45 Syntax error: unexpected end of file0Syntax Error: These are the common things which just slip. Is it unethical to take a photograph of my question sheets from a sit-down exam I've just finished if I am not allowed to take them home? weblink First, let me say there is nothing wrong with line 3.

Schengen visa to Norway to visit my wife refused Amplifier circuit woe Bounce off the atmosphere at reentry?