Home > Syntax Error > Bash Syntax Error Unexpected Expecting Done

Bash Syntax Error Unexpected Expecting Done


UNIX is a registered trademark of The Open Group. In a GNU C macro envSet(name), what does (void) "" name mean? Due to Ubuntu's DashAsBinSh affinity I suspect your script is interpreted by dash instead of bash. Dec 14 '15 at 8:32 This question has been asked before and already has an answer. this contact form

Just because you don't use it directly doesn't mean that there aren't any shell scripts on your system that rely on "/bin/sh" to behave like dash rather than bash. What is the cause of the syntax error? Wie startest Du das Skript denn? Ksh88 was limited to 1023 elements, but I don't think it accepted that syntax for assigning a number of elements to an array.

Parse Error Syntax Error Unexpected Expecting In Framework Php On Line 42

In man 1 bash hab ich nix gefunden. Laut dieser Webseite kennt "read" auch den Parameter "-n" was bei mir aber zu einem Fehler führt. Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Ksh used to be limited to 4096 elements in an array, but versions for the last few years have, like bash, been limited only by available memory. Remove

Unless this is a massive system operation running in an environment where you need to limit process resource usage as much as possible, code obfuscation in an attempt to gain performance however "a= ( a b c )" gives me an error you get. share|improve this answer answered Sep 3 '13 at 8:42 Frantique 5,4161537 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign Ruby Syntax Error Unexpected Expecting All those sleep calls might cause issues, or if one of the apt-get requests fails, the if will fail: Change: Code: if [ "$(whoami)" != "root" ]; then echo "Das Script

Can Customs make me go back to return my electronic equipment or is it a scam? Syntax Error Unexpected Expecting Keyword_end Sometimes some hidden characters are there in the source. I still get this error, pointing to the line that begins arrIN=... 8: run_all_verification.sh: Syntax error: "(" unexpected (expecting "done") The shell script: #!/usr/bin/bash #base name for all experiments BASE_EXP_ID=$1; for Can filling up a 75 gallon water heater tank without opening a faucet cause damage?

Adv Reply Page 1 of 3 123 Last Jump to page: Quick Navigation General Help Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums The Syntax Error Unexpected In Shell Script You have no idea how many times this screwed me over before I started using geany for coding scripts... Lloyd B. Ask Ubuntu works best with JavaScript enabled ubuntuusers.de Portal Forum Wiki Ikhaya Planet Mitmachen Bitte aktiviere JavaScript!

Syntax Error Unexpected Expecting Keyword_end

It's confusing. munkyeetrMay 15th, 2007, 02:41 PMokay, it now works when I run it using: bash ...which makes sense (now) because my link to sh points to the dash shell. Parse Error Syntax Error Unexpected Expecting In Framework Php On Line 42 asked 4 years ago viewed 103156 times active 10 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 Syntax Error Unexpected Expecting End das Script hatte seine Arbeit getan...

dann wurde es still... http://gatoisland.com/syntax-error/bin-sh-1-syntax-error-unexpected-expecting.php Mai 2006 Beiträge: 6411 Zitieren 10. Is there a way to make a metal sword resistant to lava? In a GNU C macro envSet(name), what does (void) "" name mean? Syntax Error Unexpected Expecting End Syntaxerror

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 So _open.txt has to have less than 1024 "words" in it. Remove advertisements Sponsored Links jim mcnamara View Public Profile Find all posts by jim mcnamara

The time now is 08:58 PM. - Contact Us - Unix & Linux - unix commands, linux commands, linux server, linux ubuntu, shell script, linux distros. - Advertising - Top http://gatoisland.com/syntax-error/bash-array-syntax-error-unexpected-expecting.php 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

I will try running the script as you did when I get home from work, and see if I get the same results. Syntax Error ( Unexpected Bash Array Simpler to just run "./test", which works correctly regardless of your default shell, and only invokes an extra copy of "bash" if one is required. 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 -

The unexpected ( in line 1, is completely wrong.

Try removing that and see what happens. Modern soldiers carry axes instead of combat knives. Not the answer you're looking for? Ksh Syntax Error Unexpected But I think it's something to do with the semicolon.

So even if the script successfully started at some point in your testing, it would have aborted once line 68 was reached. Password Protected Wifi, page without HTTPS - why the data is send in clear text? IMO. his comment is here Februar 2009 08:34 Hallo!Leider bekomme ich im Betreff genannte Fehlerzeile nicht weg...Skript: 1 2 3 4 5 6 7 8 9 10 11 12 13#!/bin/bash #dpkg --get-selections | awk '/deinstall|purge|hold/ {print

Juni 2008 Beiträge: 2288 Wohnort: Meiningen Zitieren 10. did nt copy u r code completly Sign up for free to join this conversation on GitHub. Not that this example makes much difference performance wise. 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

One more question: Since I never use the dash shell, it should be safe to redirect my sh link to /bin/bash, yes or no? Results 1 to 6 of 6 Thread: Syntax error: word unexpected (expecting "do") Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to It will almost always fail on Debian-ish distributions where sh is dash. Die doppelten gibt's in Bash-Skripten nicht (für Vergleiche).

Edit: It also occurred to me that this could be made much easier - find has a delete option: Code: find $path/*.xls -mtime +1 -delete Adv Reply April 21st, 2009 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 ein ängstliches Reboot, wohlweislich mit der Vermutung, das ich mein System vllt neu aufsetzen muss... 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

ksh limits the number of elements in an array to 1023. Most shells do not have arrays, so you may have to change the shebang to one that does, perhaps "#!/bin/bash". Nach Test hin und Test her habe ich es dann gewagt und alle diese Dateien mit dem Script löschen lassen... Thanks, Elyashiv git bash share|improve this question asked Feb 11 '13 at 8:07 ElyashivLavi 400313 1 And what files_to_notify=( $files_to_notify )is supposed to do? –VonC Feb 11 '13 at 8:48

Since you use bash features, the first line of the file must be #!/bin/bash or #!/usr/bin/env bash. So sayeth the Shepherd Modern soldiers carry axes instead of combat knives. Join Date Apr 2008 Location Campinas, SP - Brasil Beans 355 Re: Syntax error: word unexpected (expecting "do") Put this in the first line of your script file: #!/bin/sh This sets How to increase the population growth of the human race How does Gandalf get informed of Bilbo's 111st birthday party?

Laut dieser Webseite kennt "read" auch den Parameter "-n" was bei mir aber zu einem Fehler führt. Ubuntu Logo, Ubuntu and Canonical Canonical Ltd.

© Copyright 2017 gatoisland.com. All rights reserved.