Line 13: Syntax error: Unexpected end of file

I keep receiving the following error message when trying to use this script in Cygwin. When use this same script within a Linux box the script works fine? Can anyone assist with this issue?

Code:
#!/bin/bash 
cat file2.txt |while read line; do 
echo ${line} 
smbclient //${line}/c$ -W domain -U user%"password" << "EOF" 
cd "/Documents and Settings" 



ls 

done 
EOF
 
What are you trying to do? A script that creates another script?

Code:
#!/bin/bash

(
cat << EOF
#!/bin/sh
echo "test"
EOF
) > filename.txt

for EOF you can use any text.
 
myoung said:
I keep receiving the following error message when trying to use this script in Cygwin. When use this same script within a Linux box the script works fine? Can anyone assist with this issue?

Code:
cd [color="Red"]"/Documents and Settings"[/color]

Not my area of expertise, but this looks odd. Shouldn't the quotes come after the forward-slash?

Code:
cd /[color="Red"]"[/color]Documents and Settings[color="Red"]"[/color]
 
SeanC said:
Not my area of expertise, but this looks odd. Shouldn't the quotes come after the forward-slash?

Code:
cd /[color="Red"]"[/color]Documents and Settings[color="Red"]"[/color]

From what I can remember, on cygwin it should be something like "/cygdrive/c/Documents and Settings".
The dos unit C: should be /cygdrive/c
 
Back
Top