-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 12:08 16/07/2002 +0100, hrishy wrote:
>Hi David
>>What i wanted to was accept the argument to the grep
>command.
>>Say for example
>>ps -ef| grep $1 | awk '{print $1}'| xargs kill
>>where $1 is the name of the process that will be
>passed to this script.
As was already said, put the command in a file (say called kill-hrishy),
like so:
#!/bin/sh
ps -ef| grep $1 | awk '{print $1}'| xargs kill
#### End of File
make file executable, then run from the command line as follows:
kill-hrishy <processname>
Exactly what the difference between this and killall is is beyond me
(except that ps -ef will output very different information depending on
what platform you're running on).
T.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPTQBxr6WYZbx1eG3EQIEPwCfXxC2tI1I2G27qt4b73niu2adfOMAmwaA
HWPPlQeJgSus9KTPhWk+s6wH
=QaHT
-----END PGP SIGNATURE-----
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!