Sam Trenholme's webpage
This article was posted to the Usenet group alt.hackers in 1995; any technical information is probably outdated.

Re: Backwards Message Hack


Article: 7377 of alt.hackers
From: nene@u.washington.edu (Michael Stage)
Newsgroups: alt.hackers
Subject: Re: Backwards Message Hack
Date: 14 Feb 1995 02:20:06 GMT
Organization: Knight Sabers
Lines: 28
Approved: Yes
Message-ID: 3hp40m$g7r@nntp2.u.washington.edu
NNTP-Posting-Host: nntp2.u.washington.edu
Status: RO

In article <3hlce4$37u@taco.cc.ncsu.edu>,
Michael John Haisma <mjhaisma@eos.ncsu.edu> wrote:
>
>
>ps -aux|grep <process name>|grep -v grep|cut -f2 -d" "|kill
>
>Won't kill the process(es) with that name.  If I leave off the kill, the

  If you want this to work with more than one process, you need something
  like this:

 ps -a | grep <whatever> | grep -v grep | awk '{print $1}' | xargs
 kill -9

  The command substitutions (kill `<commands>`) suggested so far
  won't work
  with more than
  one process because `<commands>` will include line feeds. So, kill
  will only get the first process ID.  You could alternatively use:

 kill -9 `ps -a | grep <whatever> | grep -v grep | awk '{print $1}' |
 tr '\012' '\040'`

  ...which would be more "hackish", but somewhat unnecessary.


^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^
^_^  nene@u.washington.edu    ()    ^_^
^_^  michael stage          ()  ()  ^_^
^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^ ^_^



Parent Parent gone gone

Child

Back to index