Home > Syntax Error > Sh Syntax Error Unexpected Word Expecting

Sh Syntax Error Unexpected Word Expecting


Trick or Treat polyglot Why does Fleur say "zey, ze" instead of "they, the" in Harry Potter? What is the meaning of the 90/10 rule of program optimization? Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk running sh-script, resulting in same damn error. have a peek at this web-site

v5.1 (can do v4.6)1remove everything exept for .git directory and .gitignore on linux0“Syntax error” word unexpected6How to achieve AJAX(interactive) kind of SEARCH in LINUX to FIND files?0How to automate MySQL-Server without For details and our forum data attribution, retention and privacy policy, see here Main menu Skip to primary content Quick Start Downloads Buy Codecs Forum FAQs About About us Contact us Browse other questions tagged linux bash shell or ask your own question. Then ensure that the it is indeed installed, and if not, install it. http://unix.stackexchange.com/questions/45781/shell-script-fails-syntax-error-unexpected

Line 1: Syntax Error: Unexpected Word (expecting ")")

However in checking, I found that sh is a link to dash and bash is also a link to dash. New employee has offensive Slack handle due to language barrier How to explain the concept of test automation to a team that only knows manual testing? If you'd like to contribute content, let us know.

asked 4 years ago viewed 107005 times active 11 months ago Related 2Shell script error message1/shell-script: syntax error near unexpected token `done'4Shell Script - syntax error near unexpected token `else'0Shell script 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 Make up your mind. Syntax Error ( Unexpected Bash Array Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started

Browse other questions tagged linux bash ubuntu ubuntu-14.04 sh or ask your own question. Syntax Error Word Unexpected (expecting ) ) Shell Script While unquoted parameter/variable references are word-split and pathname-expanded in most places in POSIX-like shells, case is a curious exception. Computing only one byte of a cryptographically secure hash function Print some JSON Which kind of "ball" was Anna expecting for the ballroom? Could you fix it?

Do Germans use “Okay” or “OK” to agree to a request or confirm that they’ve understood? Syntax Error ( Unexpected Ubuntu linux bash ubuntu ubuntu-14.04 sh share|improve this question asked Jun 16 at 14:39 pedro.olimpio 734519 what's the value of $1 ? –Thomas Ayoub Jun 16 at 14:45 Executing sudo sh ./sonar.sh console. Was the term "Quadrant" invented for Star Trek How come Ferengi starships work?

Syntax Error Word Unexpected (expecting ) ) Shell Script

When you run it using ./ it will use the shell you mention on first line, in your case: #!/bin/sh if you do a ls -l /bin/sh you will see that 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 Line 1: Syntax Error: Unexpected Word (expecting ")") cnxsoft View Public Profile View LQ Blog View Review Entries View HCL Entries Visit cnxsoft's homepage! Syntax Error: "(" Unexpected Bash ksh limits the number of elements in an array to 1023.

It may be that the script has the same name as the program and is higher up the directory tree. Check This Out Hope that help someone In case that's not clear, Tej suggests that it would seem that you're trying to run the cross-compiled qmake on the host system. Are you new to LinuxQuestions.org? What sounds more likely is that that qmake file is not a script, but a binary executable that is not recognised as such by the system, for instance because it is Syntax Error At Line 1 (' Unexpected In Shell Script

arm qt4 share|improve this question asked Apr 19 at 13:53 satya prakash Panigrahi 813 migrated from unix.stackexchange.com Apr 19 at 17:50 This question came from our site for users of Linux, C++ Get min / max value of a static array at compile time Disproving Euler proposition by brute force in C Small Diwali gifts, from an overseas visitor in India during Does the Many Worlds interpretation of quantum mechanics necessarily imply every world exist? Source case "$1" in ...

Quote: Tej says: January 4, 2013 at 12:20 pm Ok, I have solved the Problem. Ksh Syntax Error Unexpected P.S 1- Sourcery toolchain is present inside /opt/ folder and my PATH variable is correctly pointing to it. 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.

Tango Icons Tango Desktop Project.

I already have automake (GNU automake 1.9.6) and aclocal (GNU automake 1.9.6). Browse other questions tagged arm qt4 or ask your own question. How to describe very tasty and probably unhealthy food Why are my prints low quality when screenshotting a PDF? Syntax Error Word Unexpected (expecting ) ) Ubuntu Show Andy Isaacson added a comment - 24/May/12 20:45 That failure would be expected if /bin/sh is not bash.

Adv Reply August 2nd, 2008 #10 dwhitney67 View Profile View Forum Posts Private Message Tolerant of Ubuntu Join Date Jun 2007 Location Maryland, US Beans 6,272 DistroKubuntu Re: running sh-script, Ubuntu Logo, Ubuntu and Canonical Canonical Ltd. Sometimes some hidden characters are there in the source. http://ipodcorrectors.com/syntax-error/sh-1-syntax-error-unexpected.php Would it be ok to eat rice using a spoon in front of Westerners?

Simply because you can NOT do something and have it work doesn't necessarily mean it is a great idea. There is a concept: self-documenting code. To make sure you run the compiled program I believe that being in the directory of the program and typing ./programname forces the program "in the current directory" to be run. when an error occurs.

In that case, when the system fails to recognise it as a native executable, the invoking application would try to run sh on it as if it was a shell script, For example, by default Debian uses dash for /bin/sh. See my comment for explanation. –anishsane Jun 16 at 15:00 Same error happening... –pedro.olimpio Jun 16 at 15:05 1 Quoting isn't necessary in that position in a case Still getting the error. –soufrk Sep 1 at 6:58 @soufrk Is it sonarqube.sh or sonar.sh?

Perderabo & I have gone around on this as well. Having a problem logging in? Where did I find these numbers? The following demonstrates this, and works with all major POSIX-like shells (dash, bash, ksh, zsh): $ sh -c 'case $1 in "foo *") echo "match";; *) echo "nomatch"; esac' - 'foo