Home > Syntax Error > Bin/sh Syntax Error End Of File Unexpected Expecting Fi

Bin/sh Syntax Error End Of File Unexpected Expecting Fi

Contents

Due to Ubuntu's DashAsBinSh affinity I suspect your script is interpreted by dash instead of bash. Hot Network Questions Estimating error of linear approximation Natural construction Is there a good way to get from Levoča to Lviv? Join them; it only takes a minute: Sign up Syntax error : end of file unexpected (expecting “fi”) up vote 7 down vote favorite 1 I am writing a makefile in That is NOT the complete file, only the part you need to change. http://sovidi.com/syntax-error/bin-sh-1-syntax-error-unexpected-expecting.php

If you see a \r in the above, see FAQ 52 for various ways to get rid of them. It should be: install: myapp @if [ -d $(INSTDIR) ]; \ then \ cp myapp $(INSTDIR);\ chmod a+x $(INSTDIR)/myapp;\ chmod og-w $(INSTDIR)/myapp;\ echo "Installed in $(INSTDIR)";\ else\ echo "Sorry, $(INSTDIR) does Why can a Gnome grapple a Goliath? So even if the script successfully started at some point in your testing, it would have aborted once line 68 was reached.

Bin Sh C Line 1 Syntax Error Unexpected End Of File

Is 8:00 AM an unreasonable time to meet with my graduate students and post-doc? Force Microsoft Word to NEVER auto-capitalize the name of my company Convince people not to share their password with trusted others How to deal with a really persuasive character? The question does not have to be directly related to Linux and any language is fair game. 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

I haven't reviewed your logic. Failing that comment out all the lins in the else clause and uncomment them one by one. current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Android Studio Syntax Error: "(" Unexpected (expecting Works sometimes1Shell scripting, loop through folders1Shell script: ssh to remote machine, then exit: 'exit' does not work2How do I close stdin in a shell script?1Hiding internal work outputs by shell script0Beginner

How to deal with a very weak student? Syntax Error End Of File Unexpected Expecting Then How does Coruscant get food? Why don't most major game engines use gifs for animated textures? share|improve this answer answered May 4 '15 at 18:54 geirha 21.3k84653 "don't put .sh extension on a bash script"?

echo echo echo echo Plugins can be downloaded here: echo http://dev.bukkit.org/bukkit-plugins fi # stop sleep 3s exit I get this error: Syntax error: end of file unexpected (expecting "then") so I Aapt: Syntax Error: End Of File Unexpected (expecting ")") Obviously, it's more different then coding then I thought. How could banks with multiple branches work in a world without quick communication? What are all the backslashes there for?

Syntax Error End Of File Unexpected Expecting Then

May be trivial, but its a rule: BASH FILES MUST HAVE ATLEAST A SINGLE EMPTY LINE FOLLOWING THE LAST LINE OF CODE. Finally, this script is approaching the level of complexity where I would consider rewriting it in a more powerful language than Bash. Bin Sh C Line 1 Syntax Error Unexpected End Of File command-line bash scripts sh share|improve this question edited May 4 '15 at 19:12 0xF2 2,04621538 asked May 4 '15 at 18:40 Kwiatkowski 91 closed as off-topic by muru, Fabby, David Foerster, Syntax Error End Of File Unexpected (expecting Done ) The time now is 11:46 AM.

How to replace tab by other command? More about the author Page 1 of 3 123 Last Jump to page: Results 1 to 10 of 21 Thread: bash - expecting "fi" but it is already there Thread Tools Show Printable Version Subscribe The Woz Monitor Natural construction Is the empty set homeomorphic to itself? Modern soldiers carry axes instead of combat knives. Java Syntax Error: End Of File Unexpected (expecting ")")

Exporting an animation as a gif file How much could a time traveler earn by selling a smartphone from 2016 in 2000? more hot questions lang-bsh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science Other Put fi on a line of its own (or put a ; before it). [ "$3" < 50 ] is the same as [ "$3" ] < 50 — it's the http://sovidi.com/syntax-error/1-syntax-error-unexpected-expecting.php Was Donald Trump's father a member of the KKK?

Mass replace names in vertex groups "Variable does not exist" Error While Reference a Package Namespace more hot questions question feed lang-bsh about us tour help blog chat data legal privacy Syntax Error: "fi" Unexpected (expecting Problem? In it, you'll get: The week's top questions and answers Important community announcements Questions that need answers see an example newsletter By subscribing, you agree to the privacy policy and terms

Most of the scripts in your ubuntu install has no extension. –geirha May 4 '15 at 19:44 Because packaging guidelines recommend that scripts in PATH shouldn't have extensions, so

Convince people not to share their password with trusted others Is there a way to make a metal sword resistant to lava? Tango Icons Tango Desktop Project. Browse other questions tagged command-line bash scripts sh or ask your own question. Syntax Error Unexpected Expecting Fi Ubuntu What type of sequences are escape sequences starting with "\033]" On THE other hand or on another hand?

User contributions on this site are licensed under the Creative Commons Attribution Share Alike 4.0 International License. When people brag about their abilities and belittle their opponents before a battle, competition, etc How would family relationships change if legal system uses collective punishment? Now, that leaves me puzzled. –soufrk Sep 1 at 7:07 add a comment| up vote 3 down vote If the shebang is not on the first line, it will not be news How can I pull a wire through a pipe that has too many turns for fish tape?

vBulletin 2000 - 2016, Jelsoft Enterprises Ltd. On a side note, don't put .sh extension on a bash script, and don't run a bash script with sh. The shell is seeing the word then^M with a carriage return on the end. share|improve this answer answered Jul 18 '10 at 2:38 HackNone 33159 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign

Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap - Main Menu Linux Forum Android Forum Chrome OS Forum Search LQ