However, your main problem is that every logical line in a make recipe is a separate shell command. Which requires more energy: walking 1 km or cycling 1 km at the same speed? Yes, better go with dwhitney's suggestion. up vote 3 down vote favorite I can't normally run sh scripts. have a peek here
American English: are [ə] and [ʌ] different phonemes? Find More Posts by paulsm4 View Blog 04-29-2010, 05:30 PM #12 roxie600 LQ Newbie Registered: Apr 2010 Posts: 5 Original Poster Rep: Thank you so much! I meant : elif (( $2 < 59 )); then s=$3-50 m=$2+1 h=$1 else s=$3-50 m=0 h=$1+1 fi –Sam Jun 3 '12 at 18:40 add a comment| up vote 0 down the_photon 'make' needs to see it as one line, so insert \ characters at the end of the lines in the shell command.
And please indent consistently. #!/bin/bash declare -i s declare -i m declare -i h if (( $3 < 50 )); then s=$3+10 m=$2 h=$1 elif (( $2 < 50 )); then If not, why? Adv Reply January 12th, 2011 #7 Arndt View Profile View Forum Posts Private Message Ubuntu Cappuccino Scuro Join Date May 2006 Beans 1,787 Re: Question about if statements in makefiles Syntax Error Unexpected End Of File In Unix Shell Script Problem?
Password Programming This forum is for all programming questions. Exporting an animation as a gif file Natural construction My home country claims I am a dual national of another country, the country in question does not. paulsm4 View Public Profile View LQ Blog View Review Entries View HCL Entries Visit paulsm4's homepage! cd to your "/tmp" directory 2.
Thanks for the explanation it's helped a lot and will be very useful to know in the future too. –kemra102 Aug 18 '12 at 12:25 Let me add that Syntax Error Unexpected End Of File In Php Why does Windows show "This device can perform faster" notification if I connect it clumsily? Not the answer you're looking for? Does mean=mode imply a symmetric distribution?
I am trying to learn to troubleshoot difficult-to-install software. navigate here Finding the desired way later means double work in such spaghetti code. I am down to the point now of trying random combinations of indentations, just to see if I can find one that works. If we have two functions that have composition differentiable does it mean both are differentiable? Syntax Error Unexpected End Of File In Linux
Read other pgfkeys' value Noun for people/employees/coworkers who tend to say "it's not my job" when asked to do something slightly beyond their norm? Adv Reply January 12th, 2011 #6 the_photon View Profile View Forum Posts Private Message First Cup of Ubuntu Join Date Jan 2011 Beans 8 Re: Question about if statements in 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 Check This Out 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
Registration is quick, simple and absolutely free. Syntax Error Unexpected End Of File Bash Since you use bash features, the first line of the file must be #!/bin/bash or #!/usr/bin/env bash. Unfortunately, the error still remains.
The Makefile will automatically check for the existence of any files which are needed to build the final product. So you forgot one fi too. This site is not affiliated with Linus Torvalds or The Open Group in any way. this contact form Than it work fine –shubham kumar Mishra Feb 12 '15 at 11:51 add a comment| up vote 0 down vote I have found that this is sometimes caused by running a
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 Do you want to help us debug the posting issues ? < is the place to report it, thanks ! I have checked the man files about if statements, my ubuntu programming book, and various other sources around the internet, and I really cannot see any reason why the above code These are the common things which just slip.
Skeletal formula for carbon with two double bonds Is 8:00 AM an unreasonable time to meet with my graduate students and post-doc? Browse other questions tagged bash makefile or ask your own question. Cut and paste the contents of this file EXACTLY 4. 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
My longer ranging goal is to learn to read makefiles. Why did companions have such high social standing? When you post back, please be sure to cut/paste YOUR version of the shell script that you executed. asked 3 years ago viewed 2683 times active 3 years ago Related 0Bash script error trying to find directory of script itself: unexpected end of file5“unexpected end of file” in bash
Join them; it only takes a minute: Sign up Bash: for loop in Makefile: unexpected end of file up vote 2 down vote favorite 1 I am writing a Makefile, which Fixed. share|improve this answer edited Jun 3 '12 at 14:51 answered Jun 3 '12 at 13:33 Gilles 32.7k580123 [[ $3 < 50 ]] compares $3 with 50 lexicographically, so if Join them; it only takes a minute: Sign up /bin/sh: Syntax Error: end of file unexpected up vote 2 down vote favorite I am getting an error when running the following
share|improve this answer edited Jul 25 '13 at 1:59 answered Jul 25 '13 at 1:54 Evan Teitelman 13.2k43758 Thanks alot evan! Is the empty set homeomorphic to itself? Estimating error of linear approximation Is my workplace warning for texting my boss's private phone at night justified?