Home > Syntax Error > Cygwin Read Command

Cygwin Read Command

Contents

share|improve this answer answered Jun 7 '13 at 9:09 spbnick 2,897914 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign Bash has difficulty dealing with the \r characters. 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 I got another error when doing that. http://netlookmag.com/syntax-error/syntax-error-near-unexpected-token-fi-39-cygwin.html

This is a result of a compatibility issue between Windows and *nix systems. This is a result of a compatibility issue between Windows and *nix systems. How should I tell my employer? Can a creature with 0 power attack?

Cygwin Read Command

It was at the end of line 3 which is now the line 11 as you probably added the shebang sequence and comments later. Change the shebang line to #!/bin/bash To decomstrate: $ /bin/sh $ i=1 $ ((i++)) /bin/sh: i++: not found share|improve this answer answered Jul 24 '13 at 10:35 glenn jackman 11.5k12036 add Does it run but not work right? About Us And how we do it.

It was quite un-understandable at first, I think Word's hidden characters and/or formatting were the issue. 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. Disease that requires regular medicine Rebus: Guess this movie An expensive jump with GCC 5.4.0 Why are terminal consoles still used? Bash has difficulty dealing with the \r characters.

share|improve this answer answered Jul 1 '13 at 16:10 ott-- 6901512 add a comment| up vote 1 down vote The file you're using has windows style line feeds (CR) at the Dos2unix Command Not Found Other freeware and nagware archiving tools supp... Code: sh ./SkyFireDB/linux_installer.sh ./SkyFireDB/linux_installer.sh: line 67: syntax error near unexpected token `done' ./SkyFireDB/linux_installer.sh: line 67: ` done' before it was: Code: sh ./SkyFireDB/linux_installer.sh ./SkyFireDB/linux_installer.sh: line 44: logo: command not found i up vote 0 down vote accepted This script has CR LF line endings.

How to construct a 3D 10-sided Die (Pentagonal trapezohedron) and Spin to a face? First time EVER using BASH, need it for a simple infinite loop on something. How could I have modern computers without GUIs? Community Tutorials Questions Projects Tags Newsletter RSS Distros & One-Click Apps Terms, Privacy, & Copyright Security Report a Bug Get Paid to Write Shop Almost there!

Dos2unix Command Not Found

I lost about one hour on this (I'm no shell expert, as you might guess ...) share|improve this answer answered May 28 '15 at 18:41 sauna-l 112 add a comment| up asked 3 years ago viewed 2852 times active 7 months ago Visit Chat Related 2How to execute shell script in cygwin?2Run shell script on windows using Cygwin1Cygwin browser script error2Bad interpreter Cygwin Read Command Should a country name in a country selection list be the country's local name? Bash While Loop See Alternatives to unix2dos conversion. –pabouk Jul 25 '13 at 15:10 @leepyron continuation: By "hash-tag" you mean the shebang sequence #!/bin/bash?

Thanks for your attention. Change syntax of macro, to go inside braces Can a creature with 0 power attack? Check if there are any special characters in the file that get lost when transferring to the post text. Lagrange multiplier on unit sphere more hot questions question feed lang-bsh about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life Bash For Loop

Any other ideas? We are at our wits end with this and everyone else seems to have no problems. What are the ground and flight requirements for high performance endorsement? have a peek here Does enlarging a character with a reach weapon affect his threat range?

I'm not really sure why this only gives the one error message, but I think it has to do with the function definition: #!/bin/bash # a.sh function a() { echo "Thing's This is more visible with od. $ od -c script 0000000 # ! / b i n / b a s h \r \n w h i 0000020 l e r How to reward good players, in order to teach other players by example Feynman diagram and uncertainty Why would a NES game use an undocumented 1-byte or 2-byte NOP in production?

Why would a NES game use an undocumented 1-byte or 2-byte NOP in production?

Anxious about riding in traffic after 20 year absence from cycling Is there a performance difference in the 2 temp table initializations? Positivity of certain Fourier transform Am I being a "mean" instructor, denying an extension on a take home exam How secure is a fingerprint sensor versus a standard password? more hot questions question feed default about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Windows and Windows editors rely upon the double return of the linefeed (\n or 0x0A or 10) plus the carriage return.

Join them; it only takes a minute: Sign up Syntax error near unexpected token 'done' in CygWin up vote 0 down vote favorite I use this script in CygWin: #!/bin/sh rm Maybe you should show us the whole code as it looks now. You can also use cat -v test.sh if your cat command takes the -v parameter. Check This Out How should I tell my employer?

Why do the Avengers have bad radio discipline? Instead I reused the same code with semi-colon approach instead. Please help. Word that includes "food, alcoholic drinks, and non-alcoholic drinks"?

Any other ideas? How to construct a 3D 10-sided Die (Pentagonal trapezohedron) and Spin to a face? An expensive jump with GCC 5.4.0 Feynman diagram and uncertainty In 5e, do you get to use the extra attack as well when you ready an attack action? Adv Reply Page 1 of 2 12 Last Jump to page: Quick Navigation Programming Talk Top Site Areas Settings Private Messages Subscriptions Who's Online Search Forums Forums Home Forums The

Reply Log In to Comment 0 dinhhoangviet May 18, 2014 I copied and created new file with the code in example of the link: #!/bin/bash COUNTER=0 while [ $COUNTER -lt 10 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 Unix & Linux Stack Exchange works best with JavaScript enabled current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list. 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

Share it with others to increase its visibility and to get it answered quickly. 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 Is an internal HDD with Ubuntu automatically bootable from an external USB case? This may or may not explain the problem.

Browse other questions tagged bash cygwin or ask your own question.