Using SHELL to get a list of processes

Hugh Senior h at FlexibleLearning.com
Thu Feb 5 13:55:45 EST 2009


Goal:
Using shell()to determine if my Rev app is among the line of all running
processes. If so, then user has started a second instance and I want to
quit.

Task 1: Get a list of all running processes and IDs.
Task 2: Get the process name and ID of my Rev app.

With me so far? Okay...

I should be able to get a list of all running process using "ps -e"
(according to http://www.ss64.com/bash/ps.html).

So I try this in the message box, hoping to see some sort of a list:

answer shell("ps -e")

What I get instead is 'ps is not recognised as an internal or external
command, operable program or batch file.'

Same result using shell("top") and shell("list-processes").

So what stupidity am I doing, please (apart from naively expecting the
syntax to work)? And how do I get the process name & ID of the app?

/H




More information about the use-livecode mailing list