develooper Front page | perl.beginners | Postings from February 2002

RE:Kill a process

From:
Jorge Goncalvez
Date:
February 7, 2002 05:31
Subject:
RE:Kill a process
Message ID:
200202071331.OAA03550@cabs40.col.bsf.alcatel.fr
HI, I wanted to kill a process INETD by code:by hand in the cygwin bash i tried 
this:
ps |awk '/INETD/{print $1}'|xargs kill
and it works, now i wanted to do it by Perl code:
I tried:
system(" c:\\cygwin\\bin\\bash.exe('ps |awk '/INETD$/{print $1}|xargs kill')")
or
system("c:\\cygwin\\bin\\ps.exe |c:\\cygwin\\bin\\awk.exe '/INETD/{print 
$1}'|c:\\cygwin\\bin\\xargs.exe c:/cygwin/bin/kill.exe");

neither by replacing \\ by /.

But didn't work why?
thanks.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About