Someone suggested that you use killall, but I don't think that really
answers your question.

-- 
-Time flies like the wind. Fruit flies like a banana. Stranger things have -
-happened but none stranger than this. Does your driver's license say Organ
-Donor?Black holes are where God divided by zero. Listen to me! We are all-
-individuals! What if this weren't a hypothetical question? [EMAIL PROTECTED]


On Sat, 14 Oct 2000, Kevin Diffily wrote:

=>I have been unable to create a simple program that will kill a 
=>running ppp connection.  I have tried
=>cat /var/run/ppp0|kill
kill doesn't read from stdin. Use
xargs kill < /var/run/ppp0 # if that indeed contains a pid.

BTW, cat fn | prog is very commonly used when you can simply say prog < fn
and eliminate an unneccesary pipe.

=>echo  /var/run/ppp0|kill
Same problem. Kill doesn't read stdin. i think what you might have meant
here is:
echo `cat /var/run/pppo` | xargs kill

=>kill<cat /var/run/ppp0
This sez: "Tell kill to read the cat file with a second argument of
/var/run/ppp0 which is surely not what you want.

=>etc.
=>
=>Any help will be appreciated.

The real point I'm trying to make is the value of the xargs command. It
reads from stdin and takes what it read to form the arguments of the
command which it will them execute. Very useful once you get the hang of
it.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to