Home > Syntax Error > Bash Array Syntax Error Word Unexpected Expecting

Bash Array Syntax Error Word Unexpected Expecting

Contents

Adv Reply Page 1 of 3 123 Last Jump to page: Quick Navigation Installation & Upgrades Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums nothing has changed! Do you want to help us debug the posting issues ? < is the place to report it, thanks ! sh is not guaranteed to be bash in some environments. http://gatoisland.com/syntax-error/bash-array-syntax-error-unexpected-expecting.php

share|improve this answer answered Aug 18 '12 at 12:08 Gilles 369k666681119 1 Thanks clearly a gap in my knowledge, I don't script much so wasn't aware of that! The script is linked in that article but convenience you can find it here also. Is this safe to display MySQL query error in webpage if something went wrong? Mark Powered by vBulletin Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc.

Line 1 Syntax Error Word Unexpected Expecting

You could (though it's a bad idea for security reasons) add "." to the PATH and then the shell will search whichever directory you are in for the command. –Nick Nov Harder to read code is harder to maintain. 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 Why?

Join Date: Feb 2004 Last Activity: 1 October 2016, 1:25 PM EDT Location: NM Posts: 10,825 Thanks: 446 Thanked 968 Times in 899 Posts Chris - With regard to arrays - Use all the bashisms you want, but call it with bash. It can even fail on OS X where sh is bash, due to compatibility settings. –that other guy Mar 26 '15 at 19:57 When I run ./run_all..sh I get Syntax Error ( Unexpected Bash Array Skeletal formula for carbon with two double bonds So sayeth the Shepherd Finding a file starting with '-' dash Modern soldiers carry axes instead of combat knives.

Both bash and dash are essential packages, which means that you shouldn't be able to mess with them without a big warning. msseverAugust 2nd, 2008, 05:59 AMOn my system, I removed the /bin/sh link to dash, and changed it to point to /bin/bash. Simply because you can NOT do something and have it work doesn't necessarily mean it is a great idea. Then, when I rm bash, which is just a symlink, and then install, I get this: apt-get install bash ...

I started writing a new one and got the above error. Ksh Syntax Error Unexpected Due to Ubuntu's DashAsBinSh affinity I suspect your script is interpreted by dash instead of bash. Browse other questions tagged arrays bash shell syntax or ask your own question. 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

  • Why does Windows show "This device can perform faster" notification if I connect it clumsily?
  • I can't find the actual bash shell anywhere.
  • Browse other questions tagged bash shell ubuntu shell-script or ask your own question.
  • Try to move the shebang in line 1. –manatwork Aug 18 '12 at 11:45 According to that article calling /bin/bash directly instead of /bin/sh will; correctly use bash instead
  • What gives?
  • Then, when I rm bash, which is just a symlink, and then install, I get this: apt-get install bash ...
  • share|improve this answer answered Oct 20 '12 at 23:13 doubleDown 4,3131429 add a comment| up vote 1 down vote also you shouldn't need to run it through sh (that's what the
  • Now that bash is installed, I think I can get all of the login scripts to work again.

Syntax Error Word Unexpected (expecting Do )

And what do I care about some random fellows rambling's? -1 for nonsense. –muru May 4 '15 at 19:37 @muru, Then Ubuntu does not follow this old "convention" of 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 Line 1 Syntax Error Word Unexpected Expecting Grab a bash binary of the same version from somewhere and manually install it. Syntax Error Word Unexpected (expecting ) ) Shell Script The PATH environment variable tells the shell which directories to search for commands.

Find all posts by cfajohnson #4 03-05-2009 figaro Registered User Join Date: Jan 2007 Last Activity: 27 August 2016, 2:57 PM EDT Posts: 842 Thanks: 93 Thanked 29 his comment is here ksh limits the number of elements in an array to 1023. Yes, syntactically, you are correct. Is 8:00 AM an unreasonable time to meet with my graduate students and post-doc? Syntax Error Unexpected In Shell Script

This site is not affiliated with Linus Torvalds or The Open Group in any way. How to deal with a very weak student? That is when I noticed that my /bin/bash was a link. this contact form Ask Ubuntu works best with JavaScript enabled Sany's Linux and Open Source Blog Linux and Open Source Blog Main menu Skip to content HomeAbout Post navigation ← Grep tab inLinux Bash/Shell

share|improve this answer answered Jun 14 '12 at 3:42 shellter 22.4k53962 add a comment| Not the answer you're looking for? Syntax Error ( Unexpected Ubuntu And, I can't seem to install bash. Now, that leaves me puzzled. –soufrk Sep 1 at 7:07 add a comment| Did you find this question interesting?

Below is the first lines in the script, line 13 in red. #!/bin/sh # NOTE: # Versions 1.9 (or higher) of aclocal and automake are required. # For Mac OSX users:

Why did companions have such high social standing? Email check failed, please try again Sorry, your blog cannot share posts by email. %d bloggers like this: Here are the results: dpkg -S /bin/bash bash: /bin/bash Since bash is acually a link to dash, I'm not sure what this is telling me. Bash Function Syntax Error Unexpected Do I have to remove dash first?

Related By Sandeep • Posted in bash script, Linux, Shell Scripting 8 Post navigation ← Grep tab inLinux Bash/Shell Script Arrays → 8 comments on “Shell script arrays Syntax error: "("unexpected” Dec 14 '15 at 8:32 This question has been asked before and already has an answer. If not, why? navigate here Browse other questions tagged command-line bash scripts sh or ask your own question.

I am also getting Syntax error: "(" unexpected The problem is, I was NOT getting it an hour ago! Find all posts by cfajohnson

#7 03-05-2009 jim mcnamara [email protected] but dash is much more different. If it still does not work then post the BASH version here by running $ bash --version share|improve this answer answered Oct 20 '12 at 18:18 Ashish Kumar 37413

period! Is there a way to make a metal sword resistant to lava? what is the difference between \twocolumn and \documentclass[twocolumn]{book} When was this language released? 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

How to book a flight if my passport doesn't state my gender? So, people who thought they were writing sh scripts were really writing a subset of bash. I had the wrong file name –Adam_G Mar 26 '15 at 20:12 You can give yourself permission to execute your file with chmod +x yourfile. Realism of a setting with several sapient anthropomorphic animal species The Woz Monitor What does Sauron need with mithril?

madams11August 3rd, 2008, 05:22 PMSomething's screwy on your system. I have removed the space still gives me the syntax error –user1357576 Jun 14 '12 at 3:23 interestingly when I execute it directly on the terminal, it works. Still getting the error. –soufrk Sep 1 at 6:58 @soufrk Is it sonarqube.sh or sonar.sh? Meaning of Guns and ghee What are the holes on the sides of a computer case frame for?

Dennis numbers 2.0 Can I use an HSA as investment vehicle by overcontributing temporarily? Run $ which bash if the output is other than /usr/local/bin/bash then change the first shebang line to the newer path, if it still does not work Try replacing third line:

© Copyright 2017 gatoisland.com. All rights reserved.