[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Little script help
Hi Alastair,
On Mon, Nov 27, 2000 at 03:07:41PM +0000, Alastair Donlon wrote:
> A really dirty command line would look like:
>
> ps -A e | grep 'cat /tmp/' | awk 'print $6' | sed -e 's/\/tmp\///'
>
That's what I had thought of, but in this case, ps _is_ a
script itself, that runs on mawk (mulinux's very own awk
implementation). Bearing this in mind, the machine this script needs to
run on takes something like 45-50 seconds to list all current processes
(no joke), plus the grep, sed and friends, the count rises and rises and
rises... That's why I had this idea of using a little script in
/proc/somewhere directly to cut the out middle man. The thing is that I
can't quite remember where the list of processes resides (if at all, I
know that a list of all processes exists at /proc/process_id), and I
wasn't too sure of its syntax (and of the syntax needed to sed/awk it).
Thanks,
José
--
José L Gómez Dans PhD student
Tel: +44 114 222 5582 Radar & Communications Group
FAX; +44 870 132 2990 Department of Electronic Engineering
University of Sheffield UK
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.