share|improve this answer answered Sep 25 '14 at 8:42 Sreeraj 2,38521430 Thanks so much its works fine –Educ Sep 25 '14 at 8:48 add a comment| Your Answer 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 Why are there no toilets on the starship 'Exciting Undertaking'? How to construct a 3D 10-sided Die (Pentagonal trapezohedron) and Spin to a face? Source
It's a little different than most languages I've used to date. The distributed setup.sh file shouldn't have had any Windows-style line endings in the first place, and if it did, I don't know why the problem wouldn't show up until line 94. touch "/cygdrive/e/wsus/wsus_update_report.out" When I run the script it gives me this error: [email protected] /cygdrive/e/wsus $ ./patch.sh + ./patch.sh WSUS Client Update Report for Tue-03-27-2007 touch: cannot touch `/cygdrive/e/wsus/wsus_update_report.out\r': No such file 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
This is the guide that I follow: n3cat.upc.edu/tools/UserGuide/UserGuide.html –leepyron Jul 26 '13 at 4:57 add a comment| up vote 0 down vote You are using bash features but using a sh This site is not affiliated with Linus Torvalds or The Open Group in any way. In the video we are using ( and not [ here is the correct line which is used in the video (while true; do echo -n "my program" >> ~/output.file; sleep asked 2 years ago viewed 4906 times active 1 year ago Get the weekly newsletter!
asked 3 years ago viewed 2852 times active 7 months ago Related 2How to execute shell script in cygwin?2Run shell script on windows using Cygwin1Cygwin browser script error2Bad interpreter error when Solution is to convert the newlines: dos2unix script_test.sh Also please note that the script is using bash construct of array and the shebang should be #!/bin/bash. All rights reserved. Bash Syntax Error Near Unexpected Token (' Ubuntu It looks like setup.sh uses Windows-style line endings -- or at least line 94 does.
It is a path to the script interpreter which will read and interpret your script file when you execute it. Maybye taking a look at it you may notice something I missed: http://www.nist.gov/customcf/get_pdf.cfm?pub_id=51097 cygwin syntax-error token biometrics share|improve this question asked Jun 24 '11 at 21:05 David 111114 add a comment| Tips like this are very helpful as I really want to improve my bash scripting knowledge. Need a way for Earth not to detect an extrasolar civilization that has radio French vs Italian resistance the sum of consecutive odd numbers Can a creature with 0 power attack?
Make text field readonly Will a tourist have any trouble getting money from an ATM India because of demonetization? http://netlookmag.com/unexpected-token/syntax-error-near-unexpected-token-do-for-loop.html During the "Lecture: Identify CPU/Memory Intensive Processes, Adjust Process Priority with Renice, and Kill Processes (Part 2)" Anthony wrote the following script in the command line: [while true; do echo -n What does "put on one's hat" mean? Display a Digital Clock Idiomatic Expression that basically says "What's bad for you is good for me" How to decrypt .lock files from ransomeware on Windows Does enlarging a character with Install Dos2unix Cygwin
How do I politely decline a research grant? Also, please take at least the 20 seconds it takes to learn how to insert formatted code into your post on this site. –Daniel Beck♦ Oct 1 '11 at 18:15 Browse other questions tagged shell-script or ask your own question. http://netlookmag.com/unexpected-token/syntax-error-near-unexpected-token-39-bash.html How could I have modern computers without GUIs?
From: Kevin Markle Index Nav: [DateIndex] [SubjectIndex] [AuthorIndex] [ThreadIndex] Message Nav: [DatePrev][DateNext] [ThreadPrev][ThreadNext] Syntax Error Near Unexpected Token In Shell Script Disease that requires regular medicine How can I stun or hold the whole party? Can a free radical be created by chemical reaction of non-radical species?
Outlet w/3 neutrals, 3 hots, 1 ground? If for any reason you cannot install the dos2unix package, you can use for example sed 's/\r//' script_test.sh >script_test-converted.sh or tr -d '\r'
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 Cygwin provides an easy tool to accomplish this. Deep theorem with trivial proof Eating Skittles Like a Normal Person Did millions of illegal immigrants vote in the 2016 USA election? Check This Out regards Sajj.
The error is printed like this: ./ex6.sh: line2: $'\r': command not found ./ex6.sh: line3: syntax error near unexpected token '$'\r'' ./ex6.sh: line3: 'fund () The file is called ex6.sh. Not the answer you're looking for? Add a language to a polyglot Unable to complete a task at work. That \r is a newline.
I'm noob. Browse other questions tagged git bash or ask your own question. I was suspecting the \r but I couldn't make it disappear. In 5e, do you get to use the extra attack as well when you ready an attack action?
The dos2unix.exe command will set all linefeeds to the single (\n) character. $ dos2unix.exe script.shdos2unix: converting file script.sh to Unix format ... Reload to refresh your session. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. 1 Unix, Linux, and (by default) Cygwin use a single LF or '\n' character.
Why are terminal consoles still used? Most useful knowledge from the 30's to understand current state of computers & networking?