Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'kill' in bash script



Pausing before the last shore of time, pfarrar at learningco.com wrote:
> 
>      I don't think your problem is the 'kill'.  I think it's the program, 
>      xargs.  It needs to run under X.
>      
>      If this were over a network I'd suggest a DISPLAY value in your 
>      environment... but I'm not sure.  I'm not sure what xargs does 
>      actually.  But your shell is not connecting to X.  Is it running as 
>      you or as a seperate user?  Is there a non X program that does 
>      whatever xargs does?

this would also work for you...and it does multiple process at a time.
	kill `pidof program_name`


xargs is not an X program.  It converts an arbitrarily long list of _x_ args
into bite-sized chunks, which potentially calls the command several times
with subsets of the list.

Even if you knew the last arg to be a directory you wouldn't want to do 
	echo * | xargs mv
-- 
-==-
Kuan Lee

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org