Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: flua script help, need help with one line< Next Oldest | Next Newest >
plinej Offline





Group: Members
Posts: 75
Joined: Oct. 2005
Posted: Feb. 04 2006,23:14 QUOTE

Thanks to mikshaw's flua_reference.uci I've been busy doing some flua scripting. If I have an execute line like the following:

execute("aterm +tr -T md5check -e md5check "..browse.." &>/dev/null")

What do I have to change to make aterm stay open after the script completes this line, instead of closing quickly without being able to read the results?
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Feb. 04 2006,23:20 QUOTE

One way to do it is to run the command in a script instead of directly running the command.  This way you can add a "read" command to the end of the script, which waits for user input before continuing.  For example, your command in flua could be something like this:
Code Sample
execute("aterm +tr -T md5check -e scriptname "..browse)

and the script would look something like this:
Code Sample
#!/bin/sh
md5check $1
read anykey


Another way to do it is to redirect output to a temp file instead of /dev/null, then read that file back into flua.  This would let you do it without needing to have an additional script file.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
plinej Offline





Group: Members
Posts: 75
Joined: Oct. 2005
Posted: Feb. 04 2006,23:44 QUOTE

Thanks mik! works great.
Back to top
Profile PM 
andrewb Offline





Group: Members
Posts: 316
Joined: July 2005
Posted: Feb. 13 2006,01:11 QUOTE

Quote (plinej @ Feb. 04 2006,08:14)
Thanks to mikshaw's flua_reference.uci I've been busy doing some flua scripting. If I have an execute line like the following:

execute("aterm +tr -T md5check -e md5check "..browse.." &>/dev/null")

What do I have to change to make aterm stay open after the script completes this line, instead of closing quickly without being able to read the results?

Where is this UCI available from?
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Feb. 13 2006,03:21 QUOTE

It was in an unofficial repository on a dsl mirror, but that server seems to be gone now.  Most of the scripts i had there can now be found here:
http://mikshaw.cesparks.com/linux/

I have to track down a few of them though, so some of the links are dead for now.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
4 replies since Feb. 04 2006,23:14 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: flua script help

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code