Home > Syntax Error > Syntax Error Word Unexpected (expecting Do )

Syntax Error Word Unexpected (expecting Do )


command-line bash scripts share|improve this question edited Sep 3 '13 at 21:57 Braiam 39.9k1694156 asked Sep 3 '13 at 8:29 user568021 3002619 How do you run the above script? Not the answer you're looking for? I already found a script that should safely shut down the VM's and then shut down the host. I cannot see anything else now. http://allconverter.net/syntax-error/syntax-error-word-unexpected-expecting.html

Letter of Recommendation Without Contact from the Student Square root image filter tool in Python TV episode or movie where people on planet only live a hundred days and fall asleep current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. Toolbox for IT My Home Topics People Companies Jobs White Paper Library Collaboration Tools Discussion Groups Blogs Follow Toolbox.com Toolbox for IT on Twitter Toolbox.com on Twitter Toolbox.com on Facebook Topics Word that includes "food, alcoholic drinks, and non-alcoholic drinks"?

Syntax Error Word Unexpected (expecting ) ) Shell Script

Is it still safe to drive? I think you also didn't post the full error message; at least bash also prints the line number (and the name of the script). Aligning texts side by side with equations in \align environment Amplifier circuit woe Did millions of illegal immigrants vote in the 2016 USA election?

Browse other questions tagged shell syntax sh nohup or ask your own question. Browse other questions tagged linux bash shell or ask your own question. The shebang line must be the very first thing in the file. Syntax Error Unexpected Word Expecting What do you do with all the bodies?

And anyway, if you can't solve the problem with the information in this thread, ask a new question with the full content of the script and copy-paste the full error message(s). Syntax Error Word Unexpected (expecting ) ) Ubuntu How many times do you need to beat mom and Satan etc to 100% the game? Am I being a "mean" instructor, denying an extension on a take home exam Disease that requires regular medicine What is this strange biplane jet aircraft with tanks between wings? How to write an effective but very gentle reminder email to supervisor to check the Manuscript?

It's confusing. Dos2unix Is there a performance difference in the 2 temp table initializations? Getting: Syntax error: word unexpected (expecting "do")..Plz help Rohan Deshmukh asked Apr 21, 2009 | Replies (1) The code snippet is as follows: Code: #!/bin/sh path="/home/directory/Reports" echo "The reports older than A lot of unquoted variables, could cause other issues, but don't think the specific error. –BroSlow Apr 3 '14 at 22:09 Try using ${DROPBOX_USERS} –Mark Setchell Apr 3 '14

Syntax Error Word Unexpected (expecting ) ) Ubuntu

Word for nemesis that does not refer to a person Unable to understand the details of step-down voltage regulator Ordering a bulky item in the USA Am I being a "mean" Using more quotes, you probably want something like this: SERVERIDS="1 2 3 4 $(vim-cmd vmsvc/getallvms | sed -e '1d' -e 's/ \[.*$//' | awk '$1 ~ /^[0-9]+$/ {print $1}')" share|improve this Syntax Error Word Unexpected (expecting ) ) Shell Script Syntax error: unexpected “(” up vote 1 down vote favorite After the changes from the first answer I got some more error codes. : not found: line 23: { esxidown.sh: line Unexpected Expecting Done if [ $STATUS -ne 0 ]; then if [ $TRY -lt $WAIT_TRYS ]; then # if the vm is not off, wait for it to shut down TRY=$((TRY + 1)) echo

I keep getting the same error. –kingneil Jan 12 at 8:30 how do you try to run your code? –Frank Provost Jan 12 at 8:31 sh retrieve4.sh this content To avoid that, run: while IFS= read -r i do wget "http://www.rcsb.org/pdb/files/$i.pdb.gz" done

Letter of Recommendation Without Contact from the Student VT-x is not available, but is enabled in BIOS Bounce off the atmosphere at reentry? Why are terminal consoles still used? UNIX is a registered trademark of The Open Group. http://allconverter.net/syntax-error/syntax-error-unexpected-keyword-end-expecting-end.html 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.

Linked 0 Syntax error: end of file unexpected (expecting “do”) Related 2211Check if a directory exists in a shell script3004Getting the Current/Present working directory of a Bash script from within the While Loop Bash Secret salts; why do they slow down attacker more than they do me? p d b .

r c 0000060 s b .

Perhaps your bash has a profanity filter :). Just for curiosity: Do you really need root privileges to delete the files? (Is the use of "sudo" necessary, it seems strange, and dangerous). asked 2 months ago viewed 42 times active 2 months ago Related 2211Check if a directory exists in a shell script760How do I prompt for Yes/No/Cancel input in a Linux shell asked 4 years ago viewed 113229 times active 1 year ago Related 2Shell script error message1/shell-script: syntax error near unexpected token `done'4Shell Script - syntax error near unexpected token `else'0Shell script

French vs Italian resistance Positivity of certain Fourier transform What does "put on one's hat" mean? Will a tourist have any trouble getting money from an ATM India because of demonetization? Join them; it only takes a minute: Sign up bash script Syntax error: word unexpected (expecting “do”) up vote 3 down vote favorite I'm trying to run this dropbox script on http://allconverter.net/syntax-error/syntax-error-token-is-unexpected-expecting.html Try entering it through vi, as it may end up being some character encoding / line feeds in your script. –dotalchemy Mar 30 '11 at 20:06 Weirdly your first

Executing sudo sh ./sonar.sh console. But I get the following error: syntax error: unexpected "(" I tried a few things but nothing worked. 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 Rebus: Guess this movie Aligning texts side by side with equations in \align environment What mechanical effects would the common cold have?

UNIX is a registered trademark of The Open Group. Make up your mind. asked 3 years ago viewed 16949 times active 3 years ago Related 6How do the environments of a standard Terminal command-line and a bash script differ?14Problem with Bash script: 'declare: not What are the downsides to multi-classing?

You can strip \r (0d) with the tr command: cat yourscript.sh | tr -d '\r' >> yournewscript.sh share|improve this answer edited Dec 28 '11 at 21:24 mac 22.7k1289105 answered Mar 30