Home > Syntax Error > Syntax Error Near Unexpected Token Done In Shell Script

Syntax Error Near Unexpected Token Done In Shell Script

Contents

Sep 16 at 18:26 add a comment| up vote 0 down vote There's a way you can get this problem without having mixed newline problems (at least, in my shell, which Understanding the grammar: «illis Evangelii nuntiandi praebens mandatum» Is there a performance difference in the 2 temp table initializations? Schengen visa to Norway to visit my wife refused How to reward good players, in order to teach other players by example Is there any financial benefit to being paid bi-weekly elif [ "$word" = $var ] && [ "$pos" = VVN ]; then ... his comment is here

Is it a coincidence that the first 4 bytes of a PGP/GPG file are ellipsis, smile, female sign and a heart? A pilot's messages Why does MIT have a /8 IPv4 block? What mechanical effects would the common cold have? Is the partition function of non-conformal theories on a torus modular invariant?

Syntax Error Near Unexpected Token Done In Shell Script

Unable to complete a task at work. more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Changed your mind? the sum of consecutive odd numbers Word for nemesis that does not refer to a person Secret salts; why do they slow down attacker more than they do me?

Fenerlitk , note that the ':' no-op command could have been put in your loop, preceding you comment, i.e. : # do something, and that loop would have finished, but you Are you sure you want to replace the current answer with this one? How could I have modern computers without GUIs? Syntax Error Near Unexpected Token Done' Cygwin Anyway, at a new terminal prompt I replaced 'exit' with 'return', and learned that:bash: return: can only `return' from a function or sourced script(I got out with ^c)So now my test

Help my maniacal wife decorate our christmas tree An expensive jump with GCC 5.4.0 What are the ground and flight requirements for high performance endorsement? While Loop Syntax Error Near Unexpected Token Done Feynman diagram and uncertainty Binary to decimal converter How do I reassure myself that I am a worthy candidate for a tenure-track position, when department would likely have interviewed me even done done There is a 'fi' missing, which makes the 'done' unexpected. How do I politely decline a research grant?

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 Near Unexpected Token Do Mac Will a tourist have any trouble getting money from an ATM India because of demonetization? Is it still safe to drive? Why is bench pressing your bodyweight harder than doing a pushup?

While Loop Syntax Error Near Unexpected Token Done

Reminds me of the old newbie jokes with ctl-alt-del. How many times do you need to beat mom and Satan etc to 100% the game? Syntax Error Near Unexpected Token Done In Shell Script Resubmitting elsewhere without any key change when a paper is rejected Is an internal HDD with Ubuntu automatically bootable from an external USB case? Syntax Error Near Unexpected Token Do For Loop shell-script share|improve this question edited Jan 2 '13 at 13:14 mtk 4,413184483 asked Jan 2 '13 at 12:19 UNIX Learner 6112 1 some general comments: You probably want to quote

You apparently have Windows line endings in your script... –jasonwryan Sep 25 '14 at 8:38 @jasonwryan i fixed it –Educ Sep 25 '14 at 17:00 add a comment| 1 this content How to decrypt .lock files from ransomeware on Windows Why does Davy Jones not want his heart around him? Sign into your account, or create a new one, to start interacting. Is there any financial benefit to being paid bi-weekly over monthly? Bash Syntax Error Near Unexpected Token Do'

Remove advertisements Sponsored Links mkukantha View Public Profile Find all posts by mkukantha

Page 1 of 4 1 234 > « Previous Thread | Next Thread » Thread Tools Show Here's what I don't get though: somewhere else in my code, I have a similar compound command, but it's not inside a for loop. What are the downsides to multi-classing? http://mmonoplayer.com/syntax-error/syntax-error-near-unexpected-token-then-39-in-shell-script.html What mechanical effects would the common cold have?

Which is wrong in shell (and most other computer languages). Syntax Error Near Unexpected Token Do In Unix To answer a question, use the “Answer” field below. Try with only -x to see where it first stops to make sense.

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

If I put a semicolon like in your example, I get a syntax error! Should a country name in a country selection list be the country's local name? Is it still safe to drive? Only One String May Be Given When Deleting Without Squeezing Repeats You most likely have a carriage return or no-break space in your file.

asked 2 years ago viewed 5847 times active 2 years ago Related 1/shell-script: syntax error near unexpected token `done'2command not found and syntax error near unexpected token2bash: syntax error near unexpected That character gets interpreted as a character. true as jack suggested, or < /dev/null which is a bit lighter. http://mmonoplayer.com/syntax-error/syntax-error-near-unexpected-token-shell-script.html It looks like evn after dos2unix you have CR line endings. –muru Aug 24 '15 at 7:22 1 @Murat, just like Stephane mentioned, the problem seems to be in the

Why would a NES game use an undocumented 1-byte or 2-byte NOP in production? In 5e, do you get to use the extra attack as well when you ready an attack action? 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 Browse other questions tagged shell-script or ask your own question.

more hot questions question feed lang-sh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation It does make finding syntax errors easier though... Log In Sign Up Report a Bug Use this form to report bugs related to the Community Report a bug: Name Email Message asked 5 years ago viewed 17568 times active 2 years ago Visit Chat Related 4576JavaScript function declaration syntax: var fn = function() {} vs function fn() {}1Shell syntax error near unexpected