Hello all.
I want to use exec to run xterm and a bash script and I want to store
the returned information a some form of string.

something like:
EXEC ["xterm, " - hold ", " - e ", " #! / Bin / bash; MYFCpid = $(ps
ux | awk '/game-engine/ && !/awk/ {print $2}'); if [[ -n $MYFCpid ]];
then ps -p $MYFCpid -o %cpu | sed -n 2p; else echo \"game-engine
instance not found running.\"; fi "]

This *should* return the average CPU use of game-engine as well, in the form of:
"
pc@Linux$ BashScript
24
$
"
Which means that it might have line terminating characters as well,
eg. "\n" ,  but I'm not entirely sure.


Thanks!

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to