Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!bloom-beacon!eru!hagbard!sunic!mcsun!cernvax!chx400!chx400!sicsun!disuns2!shawn From: shawn@litsun.epfl.ch (Shawn Koppenhoefer) Newsgroups: comp.unix.questions Subject: awk script problems Message-ID: Date: 20 Mar 91 13:14:48 GMT Sender: news@disuns2.epfl.ch Reply-To: shawn@litsun.epfl.ch Distribution: comp Organization: Ecole Polytechnique Federale de Lausanne Lines: 31 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@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 ____________________________________|### |___________________________________/