Home > Syntax Error > Cygwin Read Command

Cygwin Read Command


N=10 PARAM1_LIST=(1 2 5 10) for (( j = 0 ; j < $N; j++ )); do for i in ${PARAM1_LIST[@]}; do java -jar N3Sim.jar myConfigFile.cfg myTest-${i}-${j} $i done done bash Not the answer you're looking for? bash cygwin share|improve this question asked Jan 27 '14 at 18:52 MIIB 1,645317 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted Try quoting the Unable to complete a task at work. his comment is here

Is it unethical to take a photograph of my question sheets from a sit-down exam I've just finished if I am not allowed to take them home? Binary to decimal converter Why are terminal consoles still used? Outlet w/3 neutrals, 3 hots, 1 ground? 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

Cygwin Read Command

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 You most likely have a carriage return or no-break space in your file. Why would a NES game use an undocumented 1-byte or 2-byte NOP in production? 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 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 IMHO it would be much more readable (sorry it does not answer the question) –pataluc Jul 1 '13 at 16:03 @pataluc: Because while read... Not the answer you're looking for? Otherwise, I see one problem with your script: awk receives literal string file as the file to operate on, instead of $file variable value.

Adv Reply November 5th, 2011 #3 Deadlyhugs View Profile View Forum Posts Private Message First Cup of Ubuntu Join Date Nov 2011 Beans 5 Re: Syntax error near unexpected token 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 Please click the link in the confirmation email to activate your subscription. What are the ground and flight requirements for high performance endorsement?

I got another error when doing that. Sign into your account, or create a new one, to start interacting. For example my initial code using the newline (which threw the same error as yours): Y=1 while test "$Y" -le "20" do echo "Number $Y" Y=$[Y+1] done And using code with 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' script_test-converted.sh.

Dos2unix Command Not Found

Thanks for your attention. Unable to understand the details of step-down voltage regulator Are there too few Supernova Remnants to support the Milky Way being billions of years old? Cygwin Read Command Change it to 0a or LF only. Bash While Loop An expensive jump with GCC 5.4.0 Make text field readonly How to properly localize numbers?

What can I do now? Some of it is add...Tip: Cygwin for Bzip2 (.bz2)I find the Windows shareware and nagware tools for Gzip and Bzip2 files lacking. This site is not affiliated with Linus Torvalds or The Open Group in any way. Macs only use the carriage return (\r). Bash For Loop

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 Make text field readonly Complimenting the author of a textbook Did millions of illegal immigrants vote in the 2016 USA election? Below is the script: #!/bin/bash FROM=ANSI TO=UTF-8 ICONV="iconv -f $FROM -t $TO" # Convert find webazmoon7/ -type f -name "*" | while read fn; do cp ${fn} ${fn}.bak $ICONV < ${fn}.bak weblink Is an internal HDD with Ubuntu automatically bootable from an external USB case?

asked 3 years ago viewed 34975 times active 1 month ago Linked 1 Bash Syntax Error. Adding Stored Procedures ls: cannot access ./main_db/procs/*.sql: No such file or directory [1/0] import: *.sql ./SkyFireDB/linux_installer.sh: line 64: ./main_db/procs/*.sql: No such file or directory Adding Adding Stored Procedures Complete Importing world measurable linear functionals are also continuous on separable Banach spaces?

Browse other questions tagged bash cygwin shell-script newlines or ask your own question.

Should a country name in a country selection list be the country's local name? Success! Are you sure you want to replace the current answer with this one? cat -v will show them as ^M and M-BM- or M- respectively.

I think 61 might be the problem. +1 Adv Reply November 6th, 2011 #6 Deadlyhugs View Profile View Forum Posts Private Message First Cup of Ubuntu Join Date Nov 2011 My purpose only to create a script to automate simulations for a list of values of a parameter and repeat each simulation N times. Any help will be appreciated. http://mmonoplayer.com/syntax-error/500-syntax-error-command-unrecognized-filezilla-server.html 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

Grimes blogEmergent ChaosMark CurpheyNew School of Informati...Incentives, Insurance a...Threat Modeling the PAS...Learning from Our Exper...McAfee Avert Labs Download OPML file Log in Written and maintained by J Wolfgang Goerlich. Ubuntu Logo, Ubuntu and Canonical Canonical Ltd. Donate Find out how to contribute. Adv Reply November 6th, 2011 #10 ofnuts View Profile View Forum Posts Private Message Ubuntu addict and loving it Join Date Aug 2011 Location 479′S 12643W Beans 2,165 DistroKubuntu 14.04

bash share|improve this question asked Aug 21 '13 at 21:06 user1837725 81117 1 Your code is correct and works for me using ubuntu.