Home > Syntax Error > Bash Syntax Error Unexpected Expecting Done

Bash Syntax Error Unexpected Expecting Done

Contents

Not the answer you're looking for? All Rights Reserved. For details and our forum data attribution, retention and privacy policy, see here FAQ Forum Quick Links Unanswered Posts New Posts View Forum Leaders FAQ Contact an Admin Forum Community Forum Ubuntu Logo, Ubuntu and Canonical Canonical Ltd. his comment is here

Period. But this script: #!/bin/bash for i in `seq 1 5`; do echo $i done ...outputs this error: Syntax error: end of file unexpected (expecting "done") Is there something wrong with that How rich can one single time travelling person actually become? Is my workplace warning for texting my boss's private phone at night justified?

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

Browse other questions tagged bash shell ubuntu shell-script or ask your own question. The loop it looks ok. –Radu Rădeanu Sep 3 '13 at 8:32 I run it with the sh command: sh script.sh –user568021 Sep 3 '13 at 8:36 Please let me know where i am getting wrong.

Personal Open source Business Explore Sign up Sign in Pricing Blog Support Search GitHub This repository Watch 6 Star 61 Fork 22 eduardschaeli/wget-image-scraper Code Issues 5 Pull requests 1 Projects 0 When was this language released? Die doppelten gibt's in Bash-Skripten nicht (für Vergleiche). Ruby Syntax Error Unexpected Expecting I changed the user name and re-executed the same script and this time it worked fine!

Adv Reply September 3rd, 2011 #2 apmcd47 View Profile View Forum Posts Private Message Way Too Much Ubuntu Join Date Jun 2008 Location UK Beans 272 DistroKubuntu 12.04 Precise Pangolin Syntax Error Unexpected Expecting Keyword_end There is nothing about this line running as sudo that should stop it working to my knowledge, does anyone have any ideas? Any Ideas? What could cause the throttle to stick in my Ford Ranger?

I wrote it on my local machine (OSX running bash 3.2), and am using it on a remote server running bash 4.2. Syntax Error Unexpected In Shell Script One possibility: Could you cut and paste the exact error message you're getting? ksh limits the number of elements in an array to 1023. You obviously do not buy this idea, so it's okay.

Syntax Error Unexpected Expecting Keyword_end

[email protected]:~/Desktop$ ls -l /bin/*sh -rwxr-xr-x 1 root root 676836 2006-09-19 15:24 /bin/bash -rwxr-xr-x 1 root root 79912 2006-07-11 12:31 /bin/dash lrwxrwxrwx 1 root root 4 2007-05-13 09:13 /bin/rbash -> bash lrwxrwxrwx 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 - Parse Error Syntax Error Unexpected Expecting In Framework Php On Line 42 what is the difference between \twocolumn and \documentclass[twocolumn]{book} American English: are [ə] and [ʌ] different phonemes? Syntax Error Unexpected Expecting End Only got the error message when I separated the commands: $ sudo sh # ./install hope it helps share|improve this answer answered Nov 27 '15 at 22:00 user145114 1

Unexpected parent process id in output spectral norm of block-wise sums of matrices How to deal with a very weak student? this content When I run bash run_all.sh, I get 'Cannot open run_verification.sh', which is the script that is being called internally –Adam_G Mar 26 '15 at 20:10 Disregard. This may solve the problem. asked 1 year ago viewed 4475 times active 1 year ago Linked 3 I am getting error “array.sh: 3: array.sh: Syntax error: ”(“ unexpected” 1 `Syntax error: “(” unexpected` when trying Syntax Error Unexpected Expecting End Syntaxerror

Simply because you can NOT do something and have it work doesn't necessarily mean it is a great idea. dabei huschten diverse Warnungen an meinen Augen vorüber... For details and our forum data attribution, retention and privacy policy, see here Ubuntu Forums > The Ubuntu Forum Community > Ubuntu Specialised Support > Development & Programming > Programming Talk http://onlinetvsoftware.net/syntax-error/bash-array-syntax-error-unexpected-expecting.php thank you everyone...

That is NOT the complete file, only the part you need to change. Syntax Error ( Unexpected Bash Array 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 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

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?

no outgoing connection via ipv4 Problem with using pause and onslide in one frame Adopt A Jet/Book Subtraction with a negative result Can I use an HSA as investment vehicle by 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. 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. Ksh Syntax Error Unexpected Februar 2009 08:45 Da fehlen ein paar Leerzeichen: if [ $JN == n ];then break fi svenXY Anmeldungsdatum:22.

But I think it's something to do with the semicolon. Ich würde tippen mit sh ./Scriptname. Dalai Anmeldungsdatum:16. http://onlinetvsoftware.net/syntax-error/bash-array-syntax-error-word-unexpected-expecting.php 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

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 What to tell to a rejected candidate? Ask Ubuntu works best with JavaScript enabled ubuntuusers.de Portal Forum Wiki Ikhaya Planet Mitmachen Bitte aktiviere JavaScript! How to indicate you are going straight?

What does the "Phi" sign stand for in musical notation? Stop using the array, since you don't use it in any way that couldn't easily be replaced with a simple space-delimited string. Small changes to improve readability matter in the long run because 95% of the cost of software is in maintenance....