View Single Post
RafaLL92's Avatar
Posts: 116 | Thanked: 77 times | Joined on Jan 2010
#263
Originally Posted by Rob1n View Post
As you're getting errors even before the first echo statement, I'd guess that you've saved the file in DOS format, not in UNIX format. You should be able to convert it using either sed/tr (either of the following two lines - the ^M is generated by pressing Ctrl-V followed by Ctrl-M):
Code:
tr -d '\r' < DOS_file > UNIX_file
sed 's/^M//' DOS_file > UNIX_file
Thanks a bunch! Instead of converting the script file on the device I used online dos2unix converter and transferred the file again onto the device - the script worked then
Thanks again!