HDTenEightyP/NetNews huggingface dataset:
From: rons@netcom.com (Ron Sires)
Newsgroups: comp.unix.questions
Subject: Re: .forward
Date: 22 Jul 92 22:26:35 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest)

ntucs73@csman.csie.ntu.edu.tw (CSIE 73 student) writes:

>Hi,
>    Is there anyone able to tell me the correct format about ".forward" file ?
>   
>    I write a line in my local .forward as following :
>    
>     "| cat >> tmp "

>    But I found nothing happened.  IS something wrong with it ?

When the .forward file is executed, there isn't a PATH variable defined.
This means that UNIX doesn't know where to look for the "cat" command.  Try
including the full path to cat and, while you're at it, the full path to
tmp, too.

-Ron
<rsires@well.sf.ca.us>
<rons@netcom.com>
From: scotth@felix.filenet.com (Scott Hopson)
Newsgroups: comp.unix.questions
Subject: Changing Idle Time
Date: 29 Jul 92 00:39:07 GMT
Reply-To: scotth@fritz.filenet.com (Scott Hopson)
Organization: FileNet Corp., Costa Mesa, CA


A few people have asked me about this so I'll pass it on.

If you have people checking up on you by looking at your idle time
which is displayed by finger, then this might help. This program
constantly updates you terminal idle time so you appear to be working all the
time. This program runs as a daemon and updates any terminal you happen to
logon to.   Have Fun....

-----------------------------------CUT HERE----------------------------------
#include <stdio.h>
#include <string.h>
#include <utmp.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <sys/time.h>

char user[9];

update()
{
char *utmpFile = "/etc/utmp";
struct utmp utmp;
char ttypath[80];
FILE *fp;

    if((fp = fopen(utmpFile, "r")) == NULL)
	    return;

    while(fread((char *)&utmp, sizeof(utmp), 1, fp) == 1)
    {
	if(strncmp(utmp.ut_name, user, 8))	/* is it me */
	    continue;
	strcpy(ttypath, "/dev/");
	strncat(ttypath, utmp.ut_line, 8);
	utime(ttypath,NULL); /* reset the atime and mtime */
    }
    fclose(fp);
    return;
}

main()
{
register int x;
int sleepNum = 45;		/* num of secs to sleep */
int fd;

    strcpy(user, getlogin());	/* get user name */

    nice(20);			/* lower the priority so we don't */
				/* take time from more important things */

    if(fork() != 0) exit(0);	/* fork off a child and kill parent so */
				/* we can become a daemon */
    close(0);			/* need to close stdin,stdout,stderr */
    close(1);
    close(2);

    fd = open("/dev/tty",O_RDWR); /* open the controlling TTY so we can */
    ioctl(fd,TIOCNOTTY,0);	  /* detach the process from the TTY */
    close(fd);			  /* now close the TTY */

    while(1<2)			/* now go into an infinite loop */
    {				/* like a good little daemon */
	update();
	sleep(sleepNum);	/* ok bedtime */
    }
}
-----------------------------------CUT HERE----------------------------------

-- 
Scott Hopson   (scotth@filenet.com)
Xref: sparky comp.unix.questions:9340 comp.unix.programmer:3864 comp.unix.wizards:3287
From: sadkins@bigbird.cs.ohiou.edu (Scott W. Adkins)
Newsgroups: comp.unix.questions,comp.unix.programmer,comp.unix.wizards
Subject: Re: Making ``.plan'' EXECUTE a Program ???
Date: 23 Jul 92 12:16:07 GMT
Organization: Ohio University CS Dept., Athens

In article <bharat.711752774@Xenon.Stanford.EDU> bharat@Xenon.Stanford.EDU (Bharat Shyam) writes:
>Make your .plan a named pipe. (See "man mknod"). then have a program
>that writes to it. It will sleep until the finger daemon reads from it,
>whence your prog  will be awakened and the finger daemon will read 
>what your program is writing.

Also, check the finger man page to make sure that it will actually support
pipes.  The version of finger on my system, running Ultrix v4.2 specifically
ignores any .plan and .project files that is not a regular file (i.e. a named
pipe or a symbolic/hard link).  Here is a sample from the man page here...

     The user's .plan or .project file cannot be a link to another file.  If
     either of these files is something other than a regular file, it will be
     ignored.

At least on the other Unix system I have access to, Sun OS Unix, it allows
such things.  It it is worth while checking first though....

Don't forget to have a good day!  Some people never remember this.
-------------------------------------------------------------------------------
     Scott W. Adkins                   Internet: sadkins@ohiou.edu 
     ~~~~~~~~~~~~~~~                             ak323@cleveland.freenet.edu
 (Flame me, not the net!)                Bitnet: adkins@ouaccvma.bitnet
-------------------------------------------------------------------------------
			   Ohio University of Athens
			Home of the Great Hocking River
Newsgroups: comp.unix.questions
From: vince@ghost.dsi.unimi.it (David Vincenzetti)
Subject: QUESTION: *getresuid()*
Organization: Computer Science Dep. - Milan University
Date: Wed, 29 Jul 1992 10:13:30 GMT


From the manual:

>  NAME
>       setresuid, setresgid - set real, effective, and saved user and group
>       IDs
> 
>  SYNOPSIS
>       #include <unistd.h>
> 
>       int setresuid(uid_t ruid, uid_t euid, uid_t suid);
> 
>       int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
> 
>  DESCRIPTION
>       setresuid sets the real, effective and/or saved user ID of the calling
>       process.


Okay, I know how to set the *saved* uid.

But *how* I am going to read it?


Ciao,	David
-- 
David Vincenzetti  -*-  vince@ghost.dsi.unimi.it, +39-2-5500639[12]
                        Public Key Available by finger(1)
From: flash@pyrtech.mis.pyramid.com (Dean "Flash" Fashbaugh)
Newsgroups: comp.unix.questions
Subject: Re: Removing control codes, underscores
Date: 28 Jul 92 14:11:57 GMT
Reply-To: flash@pyrtech.pyramid.com (Dean "Flash" Fashbaugh)
Organization: Pyramid Technology Corp., Mountain View, CA
Originator: daemon@sword.eng.pyramid.com

>kuo_wy@jhunix.hcf.jhu.edu writes:
> Hi.  I was wondering if anyone could help me with the following problem.
> I'd like to be able to print a man file or ftp it do a Macintosh for
> viewing.
> Suppose I man command > temp
> Then, lpr temp.
> What I receive on the printout is, e.g.:
> KKKKSSSSHHHH SSSSiiiilllliiiiccccoooonnnn
> GGGGrrrraaaapppphhhhiiiiccccssss
>
> So, my question is how do I remove the repeated characters, the underscores
> and the control codes?

	Try using 'col -b':

	man command | col -b > file

	    My Head's Filled With,

    /~~~~~~~/_____   /\   _____  __   __        X    Dean "Flash" Fashbaugh
    ~~/ /~~ / _  /  /  \  \  __\ \ \__\ \       X    Pyramid Technology Corp.
     / /   /   _/  / /\ \  \___ \ \  ___ \      X    3850 N. First St.
    / /   / /\ \  / ____ \   __\ \ \ \  \ \     X    San Jose, CA   95134
   /_/   /_/  \_\/_/    \_\  \____\ \_\  \_\    X    (408) 428-8201
   -------------------------------------------------------------------------
   *>  Democrats and Republicans belong in "The Home", NOT IN THE HOUSE!  <*
   -------------------------------------------------------------------------
Newsgroups: comp.unix.questions,comp.unix.admin
From: marquis@well.sf.ca.us (Roger Marquis)
Subject: Enhanced lpr sought
Keywords: lpr,QPrint,enhanced
Organization: Whole Earth 'Lectronic Link
Date: Thu, 23 Jul 1992 01:26:36 GMT

I'm searching for a commercial or public domain package to add
some features to the SunOS 'lpr' command.  We've looked at SCH's
QPrint which features:

     1. Menu driven interface.
     2. A TCP/IP networked product.
     3. Rapidly submit jobs.
     4. Real-time printer transfers.
     5. Move jobs between queues.
     6. In queue file viewing.
     7. LAN support.
     8. Unlimited number of printers and forms.
     9. Support all printer types including laser, dot matrix,
          and plotters.
     10. Allow dedication of printers for specific job types.
     11. Restriction of print commands and information that users
          may access.
     12. Download fonts to laser printers dynamically
          and transparently.

and are looking to evaluate any other software with these and
similar features.  If you know of such software please reply to
this account.  I will summarize to comp.unix.questions and 
comp.unix.admin. 

Thanks,
	Roger (marquis@well.sf.ca.us)
From: mhan@elm.circa.ufl.edu (Michael Han)
Newsgroups: comp.unix.questions
Subject: Help on Internet Relay Chat (IRC)
Date: 31 Jul 92 05:39:22 GMT
Organization: University of Florida, Gainesville


	Heard that it is possible to have a 'conference-like'
talk session using irc.  Can anyone out in the newsland give me
some info about irc and how to run/set it on unix?  I am
currently on a ULTRIX 4.2 os.  Thank you in advance.

M.H.
email:  mhan@elm.circa.ufl.edu


Newsgroups: comp.unix.questions,comp.editors
From: pvr@wang.com (Peter Reilley)
Subject: Re: Binary editor in Unix?
Organization: Wang Labs, Lowell MA, USA
Distribution: usa
Date: Fri, 31 Jul 92 11:58:43 GMT

zzang@whale.stat.ufl.edu (Zhuo Zang) writes:

>Hello,
>Do we have any binary editor in  Unix ?
>I need to edit the strings in binary file sometimes
>rather than re-configure and re-compile it.

	BEAV (Binary Editor And Viewer), is a full featured binary file 
editor.	  Just about any operation that you could want to do to a binary 
file is possible with BEAV.   You can insert or delete in the middle of 
a file thereby changing it's size.   You can edit multiple files in 
multiple windows and cut and paste between them.   You can display and 
edit data in hex, octal, decimal, binary, ascii, or ebcdic formats.   You 
can display data in byte, word, or long word formats in either Intel or 
Motorola byte ordering.   You can send the formatted display mode to a 
file or printer.

	BEAV is based on the source for emacs for display and keyboard handling 
functions.   The binary file handling and display formats are special
to BEAV.   There is a full manual included in this release.   There
are makefiles for unix, xenix 286, AmigaDOS, and MSC 5.1 under DOS.   The 
old Wang PC is supported.   This has been tested on 286 and 386 PC's under 
SCO UNIX and XENIX and AIX on a RS6000.   There are a number of makefiles 
included, select the appropriate one and rename it to makefile.

	BEAV is available various archives, on SIMTEL20 it is;

	PD1:<MDSOS.FILUTL>BEAV132.ZIP	MSDOS executable and doc

	PD1:<MDSOS.FILUTL>BEAV132S.ZIP	source and doc

	I am willing to maintain BEAV and will entertain suggestions for
modifications and/or bug fixes.   I can be reached at;

		pvr@wiis.wang.com

or at;

		Peter Reilley
		19 Heritage Cir.
		Hudson, N.H. 03051
-- 
>>>>>>>>>>>> Peter Reilley ..... pvr@wiis.wang.com ..... KA1LAT <<<<<<<<<<<<<
                     Well, that about says it.
From: behe@inasys.UUCP (Bernd Hentig)
Newsgroups: comp.unix.questions
Subject: named pipe writer's end problem
Date: 28 Jul 92 08:09:54 GMT
Distribution: comp
Organization: inasys GmbH, Bonn, Germany

Systems:    ISC 3.x     
Compiler:   gcc2.2.2    
Hello,
I've got two processes S (server) and C (client).
Process S creates a named pipe P and opens it in mode RD_ONLY.

Process C opens the pipe P in mode WR_ONLY after process S
is blocking on the open.
Now C sends 10 messages to S via my own protocol layer,
using select() and read() to get the message and write() to
send the message.

Then S (the reader) closes it's end of the pipe and C goes into
a blocking select() call with the pipe descriptor set in the
exceptional descriptor set.

Question: If C does never write to this pipe again, how does it
get notified of the closed pipe ???
I do not get a SIGPIPE signal or an exceptional event as I expected
and I do not want to use an additional server pipe that closes on read.

If C closes the pipe before S, everything is o.k., the read gets
0 (EOF) as expected after the select() marked the pipe for reading.

Is there anything I am not aware of (fnctl flags, ioctl, etc.) ?
Can I use the select() call to wait on the write pipe when it's still
open and then fails if it gets closed ?
I didn't find any clues in Stevens Network Programming except using
bidirectional pipes (spipe()) which are not what I want because
they are much slower than real pipes (spipes are using streams, which
are really painful for fast communications).

Thanx for any suggestions (will post a summary, so you don't need to
crowd comp.unix.questions ... what a horror ...)
Bernd

 
Newsgroups: comp.unix.questions,comp.unix.programmer,comp.unix.wizards
From: dylan@ibmpcug.co.uk (Matthew Farwell)
Subject: Re: Making ``.plan'' EXECUTE a Program ???
Organization: The IBM PC User Group, UK.
Date: Sat, 25 Jul 1992 10:14:02 GMT

In article <1992Jul24.182737.22945@aston.ac.uk> evansmp@uhura.aston.ac.uk (Mark Evans) writes:
>tchrist@convex.COM (Tom Christiansen) writes:
>: Seem to me that doing this in fingerd:
>: 
>:     if (fork) return;
>:     setuid(-2);
>:     (do file reading
>:     exit(0);
>No this is braindead.
>Why?
>this means that user id -2 must have read access to the file.
>this means that the users dir must be searchable by anyone.

It has to anyway.  You mean you don't want other people on your machine
to be able to finger you?

>You might just as well run fingerd as uid -2 anyway.

Agreed.

>The point is that fingerd (running as root) should be able to read
>.plan, it should however check that it is not a link to a file
>the user shouldn't be reading.
>Also fork is an expensive operation, a stat(2) call is much simpler.

Theres a race condition if you use stat(2).  Try fstat(2) instead.
Anyway, fingerd has to fork (or at least exec), so its not any more
expensive.

Dylan.
-- 
It is no coincidence that in no known language does the phrase 'As
pretty as an Airport' appear -- Douglas Adams
Newsgroups: comp.unix.questions
From: hashmi@cse.uta.edu (Atiqullah Hashmi)
Subject: Leaving my .edu account. Any public int'net acct. available??
Organization: Computer Science & Engineering, Univ. of Texas at Arlington
Distribution: na
Date: Wed, 22 Jul 1992 04:21:49 GMT


Hi netters,

I posted this earlier but I don't know why the body of the msg. was
not in it, I am sure I wrote it. If you read this earlier, I am sorry
for that. Here is it again.

I am leaving my internet account( .edu) of the school and will be moving 
to either NJ or CA soon. I was wondering if the people in these areas
specially or any body in general can tell me if I can have a publicly
accessible internet account with or without(would be great) some monthly 
charges etc. If somebody has done it, kindly let me know how to contact
the source and the installation and monthly(annually etc.) cost.

Help is much appreciated. It seems that I can't live without internet 
now.

hashmi
-- 
---------------------------------
Atiqullah Hashmi                     
UTA (Univ. of Texas at Arlington)   
hashmi@cse.uta.edu                 
Newsgroups: comp.unix.questions
From: etxmesa@eos.ericsson.se (Michael Salmon)
Subject: Re: Strange behavior with paste command
Reply-To: etxmesa@eos.ericsson.se (Michael Salmon)
Organization: Ericsson Telecom AB
Date: Mon, 27 Jul 1992 15:02:42 GMT

In article <1992Jul27.141928.28250@news.acns.nwu.edu>, navarra@casbah.acns.nwu.edu (John Navarra) writes:
|> I don't get this! Why does the following happen with the paste command:
|> 
|> $ paste file1 file2 file3 > file.results
|> $ cat file.results
|> lsr005-1.wav    5.050659E-03    8.773804E-03
|> lsr005-2.wav    9.506226E-03    1.493835E-02
|> lsr005-3.wav    .0128479        1.991272E-02
|> lsr005-4.wav    1.850891E-02    .0272522
|> lsr005-5.wav    2.275085E-02    3.291321E-02
|> lsr025-1.wav    4.780579E-02    6.880188E-02
|> lsr025-2.wav    6.732178E-02    9.716797E-02
|> lsr025-3.wav    9.461975E-02    .1350403
|> lsr025-4.wav    .1144867        .163559
|> lsr025-5.wav    .1334534        .1909943
|> lsr1-1.wav      .3167419        .4694824
|> lsr1-2.wav      .5150909        .739624
|> lsr1-3.wav      .7581482        .9957733
|> lsr1-4.wav      1.062622        1.255859
|> lsr1-5.wav      1.37088 1.504074
|> 
|> 
|> What's up with the last line? Is there some way to make this print  
|> out right?

From the man page for paste:

DESCRIPTION
     In the first two  forms,  paste  concatenates  corresponding
     lines  of  the  given input files filename1, filename2, etc.
     It treats each file as a column or columns of  a  table  and
     pastes them together horizontally (parallel merging).  It is
     the counterpart of cat(1V)  which  concatenates  vertically,
     that  is, one file after the other.  In the last form above,
     paste replaces the function of an  older  command  with  the
     same  name  by  combining subsequent lines of the input file
     (serial merging).  In all cases, lines  are  glued  together
     with  the  TAB character, or with characters from an option-
     ally specified list.  paste can be used as a filter, if - is
     used in place of a filename.

1.37088 is 7 characters long so tab is a single space.

-- 

Michael Salmon

#include	<standard.disclaimer>
#include	<witty.saying>
#include	<fancy.pseudo.graphics>

Ericsson Telecom AB
Stockholm
From: dhirmes@hamp.hampshire.edu
Newsgroups: comp.unix.questions
Date: 17 Jul 92 20:57 MDT
Subject: recvfrom() problems
Nf-ID: #N:1992Jul17.125731.1@hamp.hampshir:-2006760086:001:660
Nf-From: hamp.hampshire.edu!dhirmes    Jul 17 20:57:00 1992


I'm writing a program using BSD socket interface.  I'm trying to 
utilize the UDP (datagram) service, but when I run my programs, I
get a "Bad Address" error.  I've tried several examples from tutorials,
 but I get the same error.  I'm working with SunOS 4.0.1 and some of
the examples were written for Ultrix.  I was told there might be slight 
differences in the TCP/IP structures used by BSD implementations. I'vewritten
programs usinSOCK_STREAM which have worked fine, which adds to my
confusion. Oh, and the error  only occurs when I attempt a recvfrom(),
it appears to work when I use sendto().

Can anyone help me out here?

dhirmes@hamp.hampshire.edu
From: eriks@sw.stratus.com (Erik Synnestvedt)
Newsgroups: comp.unix.questions
Subject: Histogram Tools for Unix?
Date: 22 Jul 92 20:34:22 GMT
Organization: Stratus Computer, Inc.

I am looking for information on performance analysis tools similar to prof.
What I would like is a tool that does not need a specially instrumented
executable image (ie. no recompiling).  It should be able to gather histogram
data from all processes, both user and kernel, on a system.

Anyone know of such a tool?

Any information is greatly appreciated.

Erik
From: mzraly@ra.cs.umb.edu (Michael S. Zraly)
Newsgroups: comp.unix.questions
Subject: Bourne shell question about $ expansion
Date: 30 Jul 92 17:06:51 GMT
Distribution: usa
Organization: University of Massachusetts at Boston
Originator: mzraly@ra.cs.umb.edu

Here's another question for y'all:

Is it possible to $-expand a shell variable whose name is stored
in another shell variable?  What I am looking for is the equivalent
of

	# thios does NOT work!
	xxx=bar
	bar=foo
	echo $($xxx)

to produce

	foo

-- Mike
-- 
Mike Zraly		Do not meddle in the affairs of troff,
mzraly@cs.umb.edu	for it is subtle and quick to anger.
From: lin@wharton.upenn.edu
Newsgroups: comp.unix.questions
Date: 17 Jul 92 23:45 MDT
Subject: What are Simple Source and System B
Nf-ID: #N:1992Jul17.144512.1@wharton.upenn:-228555193:001:484
Nf-From: wharton.upenn.edu!lin    Jul 17 23:45:00 1992



This morning my boss walked in my office and asked: "What are Simple Source
and System Builder?"  If I had known what he was talking about you wouldn't
see this article on the net, and if I don't find out soon I'll be mopping 
the floor with my buddy Joe.

Does anyone know what they are, what they do, and how to get them?  I would
really appreciate if anyone could e-mail any suggestions to me.  Will they
run on IBM RS/6000 with AIX 3.2?

Thanks in advance for your help.


Fred.
From: udo@umunk.GUN.de (Udo Munk)
Newsgroups: comp.unix.questions
Distribution: world
Subject: Re: Clarified VI question
X-Newsreader: Tin 1.1 PL4
Organization: umunk (private)
Date: Sat, 25 Jul 92 12:40:53 +0100

nll@cbnewsb.cb.att.com (neal.l.leitner) writes:
[...]
: In vi, when you search for a string and the search wraps around to the
: beginning of the file, is there anyway to print a message on the bottom
: of the screen that says "Search Wrapped Around Buffer" or something to 
: that effect.  I have wrapscan set, so it will wrap the searches, but when
: it does wrap the search, I want to be able to know that it did with a 
: message at the bottom of the screen.

I'm using the vi clone elvis 1.5. If I put the line "set showmode"
into my .exrc, it sayes "wrapped" when the search wraps. Maybee
this works also with your vi. If not, take a look at elvis 1.5.
--
Udo Munk     | voice:      +49 2131 275348             | uucp: +49 2131 278869
Oberstr. 21  | mail :      udo@umunk.GUN.de            |      2400/1200/300 8N1
4040 Neuss 1 | ...!{mcshh,smurf,unido}!easix!umunk!udo | MYNAME=bbsuser
Fed. Rep. of | CompuServe: 100021,2515                 | login: uucp
Germany      | at first connect get ~/info  and ~/files| pwd:   public
Newsgroups: comp.unix.questions
From: arensb@kong.gsfc.nasa.gov (Andrew Arensburger - RMS)
Subject: Re: Script for killing mutiple processes?
Organization: Goddard Space Flight Center
Date: Thu, 23 Jul 92 16:48:38 GMT

odkahn@eos.ncsu.edu (Opher D. Kahn) writes:
>I am working with a experimental database server that forks
>off child processes to serve multiple clients.  However, some
>times these processes do not terminate correctly, and I am left
>with 10-15 child processes that need to be killed.  Is it possible
>to somehow pipe the process numbers from 'ps -aux | grep dood' into
>a kill command, so that I don't have to kill each one of them
>manually???  (dood is the name of the process).

	Since everybody else is jumping on this particular bandwagon,
I might as well post my own 'pskill' script.

----- begin included file ----------------------------------------
#!/usr/local/bin/perl
# Kill processes that match a pattern.
# Usage: pskill [options] pattern
# Options:
#	-i	Ask for confirmation before killing. 'y', 'Y' or <return>
#		will kill the process. 'q' or 'Q' will exit back to the
#		shell. Anything else will leave the process alive and go on
#		to the next one.
#	-v	Verbose
#	-<num>	Use 'kill -<num>'.
#	-<NAME>	Use 'kill -<NAME>', e.g., "pskill -HUP"
#	-	This isn't really an option, but rather marks the end of
#		the options. This is to let you have patterns that start
#		with a '-'.

$| = 1;
$ask = 0;
$verbose = 0;
$signum = 15;
%signames = (
	"-HUP",	 1,
	"-INT",	 2,
	"-QUIT",	 3,
	"-ILL",	 4,
	"-TRAP",	 5,
	"-IOT",	 6,
	"-EMT",	 7,
	"-FPE",	 8,
	"-KILL",	 9,
	"-BUS",	10,
	"-SEGV",	11,
	"-SYS",	12,
	"-PIPE",	13,
	"-ALRM",	14,
	"-TERM",	15,
	"-URG",	16,
	"-STOP",	17,
	"-TSTP",	18,
	"-CONT",	19,
	"-CHLD",	20,
	"-TTIN",	21,
	"-TTOU",	22,
	"-IO",	23,
	"-XCPU",	24,
	"-XFSZ",	25,
	"-VTALRM",26,
	"-PROF",	27,
	"-WINCH",28,
	"-LOST",	29,
	"-USR1",	30,
	"-USR2",	31
);
parseargs: while (($arg = shift(@ARGV)) =~ /^-/)
{
	switch: {
		if ($arg eq "-i")
		{
			$ask = 1;
			last switch;
		}

		if ($arg eq "-v")
		{
			$verbose = 1;
			last switch;
		}

		if ($arg =~ /^-([0-9]+)/)
		{
			$signum = $1;
			last switch;
		}

		# Symbolic signal name
		if (defined($signames{$arg}))
		{
			$signum = $signames{$arg};
			last switch;
		}

		if ($arg eq "-")
		{
			$arg = shift(@ARGV);
			last parseargs;
		}

		print STDERR "Warning: unrecognized option: $arg . Ignored\n";
	}
}
$pat = $arg;
die("No pattern specified.\nStopped") if $pat eq '';

open(PS,"ps -auwx|") || die("AArgh!");
$_ = <PS>;		# Eat the first line of cruft
while (<PS>)
{
	next if /^\S+\s+$$/;
	next unless /$pat/;
	($userid,$pid) = split(/\s+/);
	print if $verbose && !$ask;
	if (!$ask || &askabout($_))
	{
		print "kill -$signum $pid\n";
		kill $signum, $pid || die("kill: $!\nStopped");
	}
}

sub askabout
{
	local ($str) = @_;
	local ($c);

	print "$str ?\n";
	$c = <>;
	exit(1) if $c eq EOF || $c =~ /^[qQ]/;
	return($c =~ /^[yY\n]/);
}
----- end included file ------------------------------------------
--
Andrew Arensburger            | Practice color discrimination:
arensb@kong.gsfc.nasa.gov     | stop at red lights!
...!uunet!dftsrv!kong!arensb  |