View Single Post
Posts: 214 | Thanked: 256 times | Joined on May 2010
#264
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
This days another device give me the same problem when I try the script, and the solution was simpler, only open another file with Leafpad and paste all the script. Simpler