Home > Syntax Error > Bin/sh Syntax Error Unexpected

Bin/sh Syntax Error Unexpected

Contents

Equation goes outside the boundary with eqnarray environment! If not, why? Is there a good way to get from Levoča to Lviv? Edit based on accepted answer: Changed the script to: #!/bin/bash automate() { git add . check my blog

I can still move the shebang of course, but that doesn't really explain as to why it works when you don’t sudo the whole script. –kemra102 Aug 18 '12 at 11:50 How to handle spending money for extended trip to Europe? In a GNU C macro envSet(name), what does (void) "" name mean? Could Hillary Clinton have declined to defend Thomas Taylor?

Bin Sh C Line 1 Syntax Error Unexpected End Of File

Join our community today! Yes, of course I'm an adult! 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. Thanks a lot in advance.

GTIN validation Finding a file starting with '-' dash I accepted a counter offer and regret it: can I go back and contact the previous company? I do know that /bin/bash is a symbolic link to /bin/dash at the moment. bash bash-scripting share|improve this question asked Aug 25 '14 at 23:06 user450632 32 Try prepending set -xv to the script. –choroba Aug 25 '14 at 23:12 stackoverflow.com/q/25495636/1030675 Syntax Error ( Unexpected Bash Array Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

Plot of the image of a circle by some functions How to handle spending money for extended trip to Europe? Bin Sh C Line 0 Syntax Error Near Unexpected Token When taking passengers, what should I do to prepare them? Inverted question mark, plus its gender An empire to last a hundred centuries How do I deal with players always (greedily) pushing for higher rewards? madams11August 3rd, 2008, 05:22 PMSomething's screwy on your system.

On my system, I removed the /bin/sh link to dash, and changed it to point to /bin/bash. Syntax Error At Line Unexpected Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). bash shell ubuntu shell-script share|improve this question edited Aug 18 '12 at 12:08 Gilles 369k666681119 asked Aug 18 '12 at 11:37 kemra102 4681613 The shebang is really in line Sometimes you go crazy debugging these madams11August 2nd, 2008, 04:04 AMif you put #!/bin/bash it will run with bash, if you put #!/bin/sh it will run with dash, unless you changed

Bin Sh C Line 0 Syntax Error Near Unexpected Token

But, I did use aptitude, and tried to install bash. So, either you run: bash regenerate-makefiles.sh or replace first line with: #!/bin/bash (or even remove the 1st line and environment will call it with bash) or (losing generality) adapt it for Bin Sh C Line 1 Syntax Error Unexpected End Of File period! Bin Sh 1 Syntax Error Unterminated Quoted String asked 3 years ago viewed 4249 times active 3 years ago Related 669How do I iterate over a range of numbers defined by variables in Bash?113How can I use Bash syntax

Will appreciate any help in resolving this. http://onlinetvsoftware.net/syntax-error/bin-sh-syntax-error-redirection-unexpected.php share|improve this answer answered Feb 18 '14 at 9:13 House Zet 37917 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google On solaris (in sh) you can not use the function keyword either... 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 Syntax Error Unexpected Expecting Syntaxerror

How to indicate you are going straight? up vote 3 down vote If the shebang is not on the first line, it will not be respected, regardless of the shell of the root user, the SHELL variable or Success! news Are you new to LinuxQuestions.org?

I dont understand the error @ all! Remove advertisements Sponsored Links Nithz View Public Profile Find all posts by Nithz

#2 06-05-2012 gary_w Registered User Syntax Error ( Unexpected Ubuntu Thanks for any help, Stig Rui PaisJuly 12th, 2007, 10:01 AMHi. An empire to last a hundred centuries Dennis numbers 2.0 Why does Windows show "This device can perform faster" notification if I connect it clumsily?

So I started experimenting by removing all the sudo lines and running the whole script via sudo at the command line like so: [email protected]:~$ sudo ./pi_dev_env_install.sh This works fine as expected

How was this bridge burning and collapsing scene filmed in Buster Keaton's The General? Use backquotes instead: Code: if [ `grep -c "My Daddy" processfile.txt` -ne 0 ] And make sure you test for the existence of processfile.txt first too. Do I have to remove dash first? Ksh Syntax Error Unexpected Video displays in Star Wars GTIN validation Password Protected Wifi, page without HTTPS - why the data is send in clear text?

Bash. but the same when i try to run in nohup mode, i am getting error Code: if [ $(grep -c "My Daddy" processfile.txt) -ne 0 ] Error: Code: syntax error at Anyone can explain this? http://onlinetvsoftware.net/syntax-error/bin-sh-function-syntax-error-unexpected.php What gives?

Browse other questions tagged bash shell ubuntu shell-script or ask your own question. On Ubuntu, /bin/sh is dash, a shell designed for fast startup and execution with only standard features. When taking passengers, what should I do to prepare them? if you are using the bourne shell, the "$( )" command substitution syntax is not supported.

Since you use bash features, the first line of the file must be #!/bin/bash or #!/usr/bin/env bash. The time now is 05:41 AM. I suspect you are really using the bourne shell. But when you use sh scriptname.sh it executes sh, not bash.

asked 2 years ago viewed 1159 times active 2 years ago Related 2Putting the cursor back at the bash prompt after a script returns delayed output1“Syntax error near unexpected token '$'\r''” How can I pull a wire through a pipe that has too many turns for fish tape? Adding the shebang line solved it immediately. +1. –bkd.online Oct 9 '13 at 5:14 Facing the issue running sonarqube.sh on Ubuntu 15.10. I will stick to using ./ from now on.

Could Hillary Clinton have declined to defend Thomas Taylor?