I am new to Bash Script. I run the following simple script in Ubuntu like this:
sudo bash -x Script.sh
Output:
+ $'\r'
: command not found
+ $'\r'
: command not found
+ $'\r'
: command not found
+ adminEmail=$'[email protected]\r'
+ $'\r'
: command not found
' echo 'database name:
database name:
+ read $'dbname\r'
The actual script:
#!/bin/bash
# Installation script for latest Wordpress website on Ubuntu
#
# Kave
# December 27, 2011
adminEmail="[email protected]"
echo "database name:"
read dbname
What are all these '\r' error messages coming up? Even the comments seem not to be understood...
dos2unix scriptname scriptname.\rare carriage returns, did you create the file on a windows machine and sent it to linux?dos2unix scriptnameand execute your script.