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

Unix Syntax Error Unexpected End Of File

Contents

Can the editor of a book add citations of individual chapters to his own citation count? Magic Item Distribution? Output a googol copies of a string more hot questions question feed lang-bsh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback You have to check that. Check This Out

All Rights Reserved. share|improve this answer answered Sep 3 '13 at 8:42 Frantique 5,4661637 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign I did not get a syntax error. tail -50 SapAdapterInboundRfc-P30-SapAdapterInboundSynchronous.log | grep -i "Error" >/dev/null then echo "There is no error in the last 50 lines in the logfile" fi The Following User Says Thank read the full info here

Syntax Error Unexpected End Of File Bash

The time now is 10:48 PM. 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 You seem to be looking for date +%T -d 'now + 10 seconds'. Run the file ("./tmp.sh") with no arguments 6.

  1. so that one can select proper file format like unix/mac etc..
  2. Let us know what happens.
  3. Shotts, Jr.
  4. tail -50 SapAdapterInboundRfc-P30-SapAdapterInboundSynchronous.log | grep -i "Error" >/dev/null then echo "There is no error in the last 50 lines in the logfile" fi Coronna688, Ouch.
  5. Why is C# Dim a Chord in B Minor?
  6. What was the first operating system to feature a separate kernel?
  7. Is there a formal way of saying 'hog'?
  8. Join our community today!
  9. I will continue working that way from now on.
  10. What would have happened to the world if the sepoy mutiny of 1857 had suceeded?

Find More Posts by ilikejam 04-29-2010, 12:30 PM #6 catkin LQ 5k Club Registered: Dec 2008 Location: Tamil Nadu, India Distribution: Debian Posts: 8,576 Blog Entries: 31 Rep: The To get that error message from bash for the command: set -xv, you must be using an editor that uses the DOS convention of carriage-return followed by newline as the line It is very strange that the output from the 1st script you showed us did not contain the line: Code: === Checking logs === Please add the following line to your Syntax Error Near Unexpected Token `fi' Also the usual convention in shell scripts is to put a newline after then and else.

syntax error: unexpected end of file error Hello, I have another problem with my script. Why were Navajo code talkers used during WW2? First, let me say there is nothing wrong with line 3. http://unix.stackexchange.com/questions/114138/shell-unexpected-end-of-file-error How do we play with irregular attendance?

In lightning component, are only html items responsive at all? Delimited By End-of-file (wanted `eof') PSM Last edited by paulsm4; 04-29-2010 at 04:55 PM. Is giving my girlfriend money for her mortgage closing costs and down payment considered fraud? Strange device identification SXA Page Design vs Page Standard Values vs Page Branch Template How would a person see with an adjustable cross-shaped pupil?

Bash Unexpected End Of File While Looking For Matching

Solutions? http://linuxcommand.org/wss0100.php Magic Item Distribution? Syntax Error Unexpected End Of File Bash I should have asked what editor you were using! Syntax Error Unexpected End Of Input How to select citizen justices?

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 his comment is here The single bracket construct is an ordinary built-in command, so special characters such as < retain their normal meaning. 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 How to fix a bent lens mount hook? Shell Script Validator

I have simplified my code majorly and still get the same error so there's obviously something wrong with my basic syntax. #usr/bin/sh if [$1 -lt $2]; then echo "done" else echo shell shell-script share|improve this question asked Feb 8 '14 at 2:31 Ramesh 16.1k1676124 1 What are the machines? Find all posts by Corona688

#7 07-31-2014 Don Cragun Administrator Join Date: Jul 2012 Last Activity: 30 October 2016, 11:41 PM EDT Location: San Jose, CA, this contact form Find More Posts by paulsm4 View Blog 04-29-2010, 02:19 PM #8 roxie600 LQ Newbie Registered: Apr 2010 Posts: 5 Original Poster Rep: hi PSM - when I ran your

Extraneous carriage returns in shell scripts, source code for other languages, and in data files will cause you no end of grief.

Remove advertisements Sponsored Links Don Cragun Syntax Error Unexpected End Of File Python What is way to eat rice with hands in front of westerners such that it doesn't appear to be yucky? Former boss asking me to do presentations Why does Deep Space Nine spin?

And do check out http://www.shellcheck.net/ share|improve this answer edited Jun 17 '15 at 22:35 answered Jun 16 '15 at 20:19 user55570 22229 Also, the result_nc thing can be skipped

asked 1 year ago viewed 652 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 If possible, how to include cut marks in PDF? (using watermark?) more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info Maybe if you showed us the whole script and told us what OS and shell you're using, we'd have a better chance of figuring out what is going on. Syntax Error Near Unexpected Token `done' Why does Wikipedia list an improper pronunciation of Esperanto?

very lightweight low power microcontroller with memory? Why does my capsule collider fall without my object (Unity)? To the shell, this looks like three assignments that apply to the command fi. navigate here This site is not affiliated with Linus Torvalds or The Open Group in any way.

You should simply if nc -z $Host $Port What you're doing is comparing the variable $result_nc ('nc -z $Host $Port; echo $?') with 0, which will never be true. –moebius_eye Jun This brings up an important thing to remember when you are writing your scripts. Use echo commands to verify your assumptions.