May 16, 2012
Using EOF in a shell script
Today i was writing a shell script. During this task i encountered a problem with EOF ( End Of File ).
After i found the cause and i’m still thinking to this , i did not know this info !
Follow an example here:
./test.sh: line 11: syntax error: unexpected end of file
After i tried to don’t indent EOF… i did not know which was the cause of this problem.
So , the script changed in this:
root@server1 # ./test.sh
this is a test
It worked !