Programming and Scripting :: flua script help



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?

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.

Thanks mik! works great.
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?
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.

Next Page...
original here.