I am trying to run a simple loop through all the script files, but this gives me the following error. The script is called test.sh and I use Cygwin on Windows 7.
My script:
#!/bin/bash FILES = "/bowtie-0.12.7-win32/bowtie-0.12.7/output_635_25bp/*" for f in $FILES do echo "hello world" done
Error:
./test.sh: line 2: FILES: command not found ./test.sh: line 4: syntax error near unexpected token ``$'do\r'' ./test.sh: line 4: ``do
Before running the script, I converted all the files in the folder to unix format using the dos2unix .
source share