Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 03-22-2010, 11:13 AM   #1
34973
Junior Member
34973 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2010
Device: none
view command output

how i can see command output on dr800s??
i try use script run from sd card, witch redirect command output to file and store to sd card. But this doesn't work

this is the script:
# !/bin/bash
mkdir -p /media/mmcblk0p1/System/.test
ls -al / > /media/mmcblk0p1/System/.test/output.txt

can any one help me? I have a few cross complied application i don't know if it working or not
34973 is offline   Reply With Quote
Old 03-22-2010, 01:43 PM   #2
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by 34973 View Post
how i can see command output on dr800s??
i try use script run from sd card, witch redirect command output to file and store to sd card. But this doesn't work

this is the script:
# !/bin/bash
mkdir -p /media/mmcblk0p1/System/.test
ls -al / > /media/mmcblk0p1/System/.test/output.txt

can any one help me? I have a few cross complied application i don't know if it working or not
I was thinking this same problem a few days ago. There isn't an easy way to see the logs.
Maybe compile zenity or xdialog and create a program link which opens the output.

Other solution could be to create the output file on another not hidden directory (not inside a directory whose name starts with a dot) and open it as a normal document.

Anyway, if you are serious about creating software for DR800 you should use the environment and the emulator to test the programs. There is a virtual machine with the proper environment ready to run.
Iņigo is offline   Reply With Quote
Advert
Old 03-22-2010, 02:07 PM   #3
Mr. X
Connoisseur
Mr. X is on a distinguished road
 
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
Redirection does work, I uploaded a script that ran dmesg and a bunch of other commands in another thread. One thing to watch out for is filesystem write caching... In the emulator especially make sure to throw a 'sync' command in at the end or the writes never reach disk.

Also, remember that most standard commands are busybox not the normal unix variants... I'm not sure if mkdir supports -p for example... If you use the emulator you can ssh in and run your script and get useful feedback
Mr. X is offline   Reply With Quote
Old 03-23-2010, 08:18 PM   #4
34973
Junior Member
34973 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2010
Device: none
Quote:
Originally Posted by Mr. X View Post
Redirection does work, I uploaded a script that ran dmesg and a bunch of other commands in another thread. One thing to watch out for is filesystem write caching... In the emulator especially make sure to throw a 'sync' command in at the end or the writes never reach disk.

Also, remember that most standard commands are busybox not the normal unix variants... I'm not sure if mkdir supports -p for example... If you use the emulator you can ssh in and run your script and get useful feedback
Can you please give me example how can i use redirection?
34973 is offline   Reply With Quote
Old 03-23-2010, 08:28 PM   #5
Mr. X
Connoisseur
Mr. X is on a distinguished road
 
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
The script attached to https://www.mobileread.com/forums/sho...&postcount=155 uses redirection
Mr. X is offline   Reply With Quote
Advert
Old 03-24-2010, 04:08 AM   #6
Iņigo
Guru
Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.Iņigo did not drink the Kool Aid.
 
Posts: 730
Karma: 72743
Join Date: Feb 2008
Location: Here or there
Device: iRex iLiad, iRex DR800S. K4NT. Kobo Aura, Aura One, Libra 2.
Quote:
Originally Posted by 34973 View Post
Can you please give me example how can i use redirection?
Look at the first message in this thread:
Code:
ls -al / > /media/mmcblk0p1/System/.test/output.txt
See the > char here? that redirects previous command (ls, list files, similar to dir command on MSDOS) output to a file.

Another example could be:
Code:
ls -al / > /media/mmcblk0p1/System/.test/output.txt 2>&1
that redirects both standard output and standard error to the file.

But note that if the destination file is inside a hidden directory (one that starts with a dot, as .test) you won't be able to navigate into it with the DR800, as the device don't show those folders.
Read the second message for other alternatives.
Iņigo is offline   Reply With Quote
Old 03-24-2010, 12:14 PM   #7
34973
Junior Member
34973 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Mar 2010
Device: none
Thanks! It work like charm!
Problem was mostly in editor what i used, script was good but in dos mod
34973 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to have default view as code view? sherman Sigil 5 06-15-2010 01:47 AM
how to customize the view command? ctop Calibre 3 04-28-2010 08:27 PM
Calibre > ePUB Output > View Same on Nook Themus Calibre 1 04-20-2010 09:10 PM
Is it possible to view the Format of a book in Library view? highwaykind Calibre 6 01-23-2010 06:28 PM
Why use the command line? slantybard Calibre 6 07-22-2009 12:17 PM


All times are GMT -4. The time now is 02:11 PM.


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