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

Bin/sh Syntax Error End Of File Unexpected Expecting Fi

Contents

PSM Last edited by paulsm4; 04-29-2010 at 04:55 PM. Like this: if [ -f $PID ]; then rm $PID; fi The semi-colons are essentially shorthand so you can put this small if statement on a single line. Changed the header as said. Ask Ubuntu works best with JavaScript enabled UbuntuCommunityAsk!DeveloperDesignDiscourseHardwareInsightsJujuShopMore ›AppsHelpForumLaunchpadMAASCanonical current community chat Ask Ubuntu Ask Ubuntu Meta your communities Sign up or log in to customize your list. http://gatoisland.com/syntax-error/bin-sh-1-syntax-error-unexpected-expecting.php

Browse other questions tagged bash makefile or ask your own question. Since you use bash features, the first line of the file must be #!/bin/bash or #!/usr/bin/env bash. Try removing that and see what happens. How to deal with a really persuasive character?

Bin Sh C Line 1 Syntax Error Unexpected End Of File

Please explain the local library system in London, England How can I pull a wire through a pipe that has too many turns for fish tape? Problem? For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration.

Now when run this script install and sets up the environment without error but you have to enter your sudo password more than once due to sudo's time-out value by default. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. To the shell, this looks like three assignments that apply to the command fi. Android Studio Syntax Error: "(" Unexpected (expecting asked 1 year ago viewed 588 times active 1 year ago Related 1“syntax error: unexpected end of file” simple script1mysql statement in bash shell script does not work / syntax error0Subshell

Not the answer you're looking for? Syntax Error End Of File Unexpected Expecting Then Were slings used for throwing hand grenades? When you post back, please be sure to cut/paste YOUR version of the shell script that you executed. But I think it's something to do with the semicolon.

Password Protected Wifi, page without HTTPS - why the data is send in clear text? Aapt: Syntax Error: End Of File Unexpected (expecting ")") 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 Adv Reply September 4th, 2011 #6 SeaKing View Profile View Forum Posts Private Message A Carafe of Ubuntu Join Date Jul 2011 Location Germany Beans 88 DistroUbuntu 12.04 Precise Pangolin If you don't have dos2unix then try running this command: sed -i 's/\r$//' filename share|improve this answer answered Aug 9 '13 at 23:47 glenn jackman 121k1782161 add a comment| Your Answer

Syntax Error End Of File Unexpected Expecting Then

Eh, what? How does Coruscant get food? Bin Sh C Line 1 Syntax Error Unexpected End Of File Put fi on a line of its own (or put a ; before it). [ "$3" < 50 ] is the same as [ "$3" ] < 50 — it's the Syntax Error End Of File Unexpected (expecting Done ) UNIX is a registered trademark of The Open Group.

more hot questions 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 Science Other news Is 8:00 AM an unreasonable time to meet with my graduate students and post-doc? paulsm4 View Public Profile View LQ Blog View Review Entries View HCL Entries Visit paulsm4's homepage! If you ever got to execute this line, you'd see an error bash: fi: command not found. Java Syntax Error: End Of File Unexpected (expecting ")")

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 Which requires more energy: walking 1 km or cycling 1 km at the same speed? In a GNU C macro envSet(name), what does (void) "" name mean? http://gatoisland.com/syntax-error/1-syntax-error-unexpected-expecting.php It is hard enough to debug programs without having to guess what the source code actually looks like. –Jonathan Leffler Nov 22 '13 at 3:42 Ignoring the EOF, \$2

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 Syntax Error: "fi" Unexpected (expecting Skeletal formula for carbon with two double bonds Can filling up a 75 gallon water heater tank without opening a faucet cause damage? paulsm4 View Public Profile View LQ Blog View Review Entries View HCL Entries Visit paulsm4's homepage!

You can easily confirm this is with a simple example: # #!/bin/bash offfset=(`ls`) echo $offset Running this script with sudo will raise a syntax error in recent versions of Ubuntu and

Stop0syntax error: unexpected end of file1srlua makefile error lua.h No such file or directory0How to solve the 'undefined reference to libusb' error in ros?0`/bin/bash: -c: line 13: syntax error: unexpected end GTIN validation Mass replace names in vertex groups Is this safe to display MySQL query error in webpage if something went wrong? The script : #!/bin/bash declare -i s declare -i m declare -i h if [ "$3" < 50 ]; then s=$3+10 m=$2 h=$1 else if ["$2" < 50 ]; then s=$3-50 Syntax Error Unexpected Expecting Fi Ubuntu Now I know my ABCs, won't you come and golf with me?

Multiplication by One Can Customs make me go back to return my electronic equipment or is it a scam? Last edited by zero2xiii; September 4th, 2011 at 12:14 PM. It looks a bit as if you have some here documents in use. check my blog And the problem is the format of the file is "dos", but in linux shell requires "unix", so I install the "dos2unix" $ sudo apt-get install dos2unix or if you use

The initial EOF is generating the EOF: not found (but that says it is on line 2, not line 1 as shown in your script). Obviously, it's more different then coding then I thought. If you are using $(command) to get the output of a command, you need that dollar sign to be left alone; \$(command) will turn into a literal string "$(command)" which isn't Set "execute" permissions (by running "chmod +rx tmp.sh") 5.

Furthermore, commands should not have extensions at all. –geirha May 4 '15 at 19:36 What does bash not being sh have to do with an extension that is common Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] bash - expecting "fi" but Browse other questions tagged bash ubuntu-10.04 shell . Noun for people/employees/coworkers who tend to say "it's not my job" when asked to do something slightly beyond their norm?

© Copyright 2017 gatoisland.com. All rights reserved.