Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-12-2014, 08:59 AM   #1
nixlos
Member
nixlos began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Dec 2013
Device: kindle 4
Shell Script Kindle 4nt

i wrote this little script (my first one) for the kindle 4nt but it dont work. this script should turn the page after 1 minute

i connect to my kindle by ssh and make it executable "chmod +x test.sh"

and i execute it with: sh test.sh

her is the code:
Quote:
#!/bin/sh

sleep 1[m]
echo "send 191" > /proc/keypad
echo "Done!"
thats what i get
Quote:
login as: root


Welcome to Kindle!

root@192.168.0.106's password:
#################################################
# N O T I C E * N O T I C E * N O T I C E #
#################################################
Rootfs is mounted read-only. Invoke mntroot rw to
switch back to a writable rootfs.
#################################################
[root@kindle root]# cd /mnt/us
[root@kindle us]# chmod +x timer.sh
[root@kindle us]# sh timer.sh
: not foundine 2:
'leep: invalid number '10[s]
: nonexistent directoryt create /proc/keypad
timer.sh: line 4: send: not found
Done!
can anyone tell me whats wrong?

Last edited by nixlos; 08-12-2014 at 09:31 AM.
nixlos is offline   Reply With Quote
Old 08-12-2014, 12:02 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Kill the brackets around the suffix in the args to sleep.
Also, possibly not the right way to do that on a K4, that looks like it was meant for a K2/3. Can't remember how to do that on the K4 OTOH.

Check that your script is properly unix line endings too.
NiLuJe is offline   Reply With Quote
Advert
Old 08-12-2014, 12:14 PM   #3
nixlos
Member
nixlos began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Dec 2013
Device: kindle 4
it would make my life much easyer...

can anyone give me a good example?
nixlos is offline   Reply With Quote
Old 08-12-2014, 12:46 PM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by nixlos View Post
it would make my life much easyer...

can anyone give me a good example?
http://www.tldp.org/LDP/abs/html/
knc1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to randomize files in directory Eradicatore Kindle Developer's Corner 25 04-15-2014 10:18 PM
invoking sql in a shell script Mingyar Kobo Developer's Corner 17 05-31-2013 06:50 PM
pdf to txt shell script Mr.Castro0o PDF 0 03-27-2013 07:39 AM
Kindle 4NT joe_bryan86 Amazon Kindle 0 12-04-2012 08:15 AM
Shell script to wait for user input from K3g keyboard jmseight Kindle Developer's Corner 33 04-01-2012 04:32 PM


All times are GMT -4. The time now is 06:58 AM.


MobileRead.com is a privately owned, operated and funded community.