View Single Post
Old 02-24-2012, 02:27 PM   #51
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by murz_07 View Post
Thats all
What can be the problem?
It looks like the commands followed by a semi-colon ";" worked, but commands ending with end-of-line did not work. You probably have carriage returns (CR, 0x0d) in the file, if you saved it from a Windows or a Mac editor. Linux commands normally end with linefeed-only (LF, 0x0a). Windows uses CR/LF. Macs (old ones) use CR-only.

As an experiment, you could try adding " # " (comment) to the end of the lines, which should make the last command on the line work properly because only a comment will then be damaged by the Windows CR character. If you use a Mac that puts only CR line-endings in the file, the commands on all lines up to the next LF character might become comments. Following the last command on a line with another semi-colon instead of a " # " may work as well (even on an old Mac). But the right thing to do is to remove CR characters, if that is the problem.

You could open it in a hex editor and search for 0x0d characters to see if that is the problem. Try using a programmer's editor that lets you save files in linux format with linefeed-only (LF, 0x0a) required for most scripts that run in linux systems like the kindle. Or use a conversion utility to change the line endings (if that is the problem).

Another thing I planned to add to this particular RUNME.sh, but did not do yet, is dumping out the system log messages, like this:

echo "*** dmesg ***"; dmesg

Last edited by geekmaster; 02-24-2012 at 03:02 PM.
geekmaster is offline   Reply With Quote