Forgive me for this is a very simple script in Bash. Here's the code:
#!/bin/bash # june 2011 if [ $# -lt 3 -o $# -gt 3 ]; then echo "Error... Usage: $0 host database username" exit 0 fi
after running sh file.sh:
syntax error: unexpected end of file
I think file.sh is with CRLF line terminators.
run
dos2unix file.sh
then the problem will be fixed.
You can install dos2unix in ubuntu with this:
sudo apt-get install dos2unix
2.1m questions
2.1m answers
60 comments
57.0k users