[ale] xargs processes as input arrives?

Jeff Lightner jlightner at water.com
Fri Apr 17 13:53:24 EDT 2009


I've always assumed xargs processed each item as it arrived but saw
something today that made me think perhaps this isn't the case.

 

In essence I'm doing an "ls -tr log.* |xargs grep -hA 30 sometext"

 

Files are log, log.1, log.2 ... log.10 where log is the newest and
log.10 is the oldest.   

 

My subsequent processing relies on the information from log.10 appearing
first then log.9 then log.8 ... log.

 

What I saw today made it look as if it somehow grabbed log.10 at the end
instead of the beginning.   

 

Apparently they were doing some tweaking of logs today so it's possible
what I saw was a result of them moving something.   

 

I'd just like confirmation that xargs does in fact process things (and
display it) in the order of what is piped into it rather than buffering
it all and deciding on its own order.   

 

Nothing in the man page seems to directly answer question about order.
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20090417/8fdc53b8/attachment-0001.html 


More information about the Ale mailing list