awk script problems <sigh>

Shawn Koppenhoefer shawn at litsun.epfl.ch
Wed Mar 20 23:14:48 AEST 1991


I am trying to set something up such that if my xdm process dies
the xdm-pid file is removed in the /tmp directory.
So far I've got: ps -aux | grep xdm | grep -v grep | egrep "0 (xdm)"
which gives me the line:

root       122  0.0  0.0   88    0 ?  IW   12:43   0:00 xdm


if the xdm process exists. Now, I figured that if I passed this into
the following awk script the /tmp/xdm-pid file would be erased. but
instead I get an error... what's wrong?!
-----------------my executable file looks like the following

awk '
$11 == "xdm" { touch thisfile }
'

I use "touch thisfile" to see if the file "thisfile" is created, but
it never is! (later I'll replace "touch thisfile" with "rm
/tmp/xdm-pid"

--

_____________________________________________________________________________
| shawn at litsun.epfl.ch     -.-  KLEIN BOTTLE FOR SALE ...            \#######
| Shawn Edwin Koppenhoefer \_/                    ... enquire within  \######
| Sun System-Manager, EPFL (Ecole Polytechnique Federale de Lausanne)  \#####
| EL-Ecublens, CH 1015 Lausanne SWITZERLAND (021)6934703 telefax=474660 \####
| from Canada dial: 1-41-21-693-4703 ____________________________________|###
|___________________________________/



More information about the Comp.unix.questions mailing list