While writing shell scripting in Ubuntu, Windows and deploying it in *NIX based machine, we found some issue. That the file running perfectly on the Ubuntu (Linux), Windows machine. The same script was displaying errors like
'\r': command not found
^M: command not found
There was a formatting issue. You need to run the following command to resolve it.DOS2UNIX
Installation:
sudo apt-get install tofrodos
Syntax:
dos2unix filename
Example:
dos2unix script1.sh
To know more about this you can go through References.
References:
http://linuxcommand.org/man_pages/dos2unix1.html
http://www.thefreecountry.com/tofrodos/
If you have any further queries, please add your comments. You can also mail to psrdotcom@gmail.com
No comments:
Post a Comment