1

Bash/Korn shell script edited on Windows throws error '...^M: not found'

view story
linux-howto

http://unix.stackexchange.com – Some background: I am new to scripting and wrote a simple Bash script in Windows using Notepad++. cxStopAllServicesOnSERVER.sh #usr/bin/bash cd "/some/path" echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log" echo "["`date`"]*** STOPPING ALL SERVICES ON SERVER ***" >> "cxStartStopLogger.log" exit Now after uploading it and setting the required file permissions, I tried executing it as follows: bash-3.00$ cat cxStopAllServicesOnSERVER.sh #Let's have a look at the code. #usr/bin/bash cd "/some/path/" echo "Hi. Logs can be found at "`pwd`"/cxStartStopLogger.log" echo "["`dat (HowTos)