Syntax Error Near Unexpected Token Done' For Loop
Close current window shortcut Complimenting the author of a textbook Does using documentation as a developer make me look unprofessional? Password Home Search Forums Register Forum RulesMan PagesUnix Commands Linux Commands FAQ Members Today's Posts Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, Simple script Related 1bash - syntax error near unexpected token `<'0Bash: syntax error near unexpected token `else'2BASH: syntax error near unexpected token `done' with alias named 'do'1Bash syntax error near unexpected Not the answer you're looking for? http://allconverter.net/syntax-error/syntax-error-near-unexpected-token-done-while-loop.html
bash shell-script newlines share|improve this question edited Aug 24 '15 at 23:00 Gilles 382k727031146 asked Aug 24 '15 at 6:58 Murat 7818 1 Chances are the problem is in the asked 1 year ago viewed 257 times active 1 year ago Related 0While loop in Shell2Shell command not asking for password inside while loop3For loop syntax bash script9Bash Tab Completion: '-bash: First time EVER using BASH, need it for a simple infinite loop on something. 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 Done In Shell Script
You most likely have a carriage return or no-break space in your file. Installing vim on some non-Linux systems can be quite annoying... –Gert van den Berg Jan 2 '13 at 12:32 i am not saying it will fix the code , Who is spreading the rumour that Santa isn't real?
Hardware Utilization" echo "Which option do you require?" read menunumber case $menunumber in 1) echo "USER INFORMATION" echo "1. While Loop Syntax Error Near Unexpected Token Done I didn't notice the requirement for spaces around the brackets before.The rule of semicolon after condition (or maybe I should say before "do" and "then") seems to hold for everything: if, fi done ) share|improve this answer answered Apr 11 '11 at 2:55 Random832 18k22852 Hi Random832, Thanks for the suggestion. Registered Users" echo "2.
Schengen visa to Norway to visit my wife refused the sum of consecutive odd numbers What is this strange biplane jet aircraft with tanks between wings? Syntax Error Near Unexpected Token Do Mac Did millions of illegal immigrants vote in the 2016 USA election? isn't it ? –Rahul Patil Jan 2 '13 at 12:34 It depends a lot on the user's environment. Grass grows through the floor of my building How to construct a 3D 10-sided Die (Pentagonal trapezohedron) and Spin to a face?
While Loop Syntax Error Near Unexpected Token Done
How to write an effective but very gentle reminder email to supervisor to check the Manuscript? It was quite un-understandable at first, I think Word's hidden characters and/or formatting were the issue. Syntax Error Near Unexpected Token Done In Shell Script See my edit. Syntax Error Near Unexpected Token Do For Loop Square root image filter tool in Python How could I have modern computers without GUIs?
How to decrypt .lock files from ransomeware on Windows Lagrange multiplier on unit sphere Should a country name in a country selection list be the country's local name? check over here Are you sure you want to replace the current answer with this one? Not the answer you're looking for? This command made the script run correctly. –Murat Aug 24 '15 at 12:10 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Bash Syntax Error Near Unexpected Token `do'
This is symptomatic of unexpected CR characters in the text file. Disk Usage" echo "3. UNIX is a registered trademark of The Open Group. http://allconverter.net/syntax-error/syntax-error-on-token-s-misplaced-construct-s-for-loop.html Browse other questions tagged shell-script or ask your own question.
Remove the Windows line breaks with tr -d '\r' file.sh > fixedfile.sh share|improve this answer edited May 20 '15 at 17:51 answered Aug 22 '13 at 0:23 that other guy 46.5k54274 Only One String May Be Given When Deleting Without Squeezing Repeats Browse other questions tagged bash shell-script newlines or ask your own question. Thanks so much for the help!!!
Eating Skittles Like a Normal Person Most useful knowledge from the 30's to understand current state of computers & networking?
Schengen visa to Norway to visit my wife refused Display a Digital Clock How many times do you need to beat mom and Satan etc to 100% the game? Not the answer you're looking for? Member Posts: 449 Re: bash while loop « Reply #2 on: December 11, 2014, 04:11:45 PM » Quotespace after the opening square bracked and space before the closing square bracket.semicolon must Syntax Error Near Unexpected Token `$'do\r'' split strings and add them as new row Am I being a "mean" instructor, denying an extension on a take home exam How secure is a fingerprint sensor versus a standard
share|improve this answer edited May 10 '12 at 16:32 answered May 10 '12 at 13:16 chepner 146k12127204 1 : is the correct no-op, but 'true' has been a builtin for asked 3 years ago viewed 10117 times active 2 years ago Related 4Shell Script - syntax error near unexpected token `else'2command not found and syntax error near unexpected token2bash: syntax error Resubmitting elsewhere without any key change when a paper is rejected Why does Snoke not cover his face? weblink Change syntax of macro, to go inside braces Letter of Recommendation Without Contact from the Student Does enlarging a character with a reach weapon affect his threat range?
What dice mechanic gives a bell curve distribution that narrows and increases mean as skill increases? 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