[ale] xargs processes as input arrives?

Jim Lynch ale_nospam at fayettedigital.com
Fri Apr 17 14:36:16 EDT 2009


Jim Lynch wrote:
> Jeff Lightner wrote:
>>
>> 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.
>>
> Do a "man ls" and look for -r
>
> ;)
>
> Jim.

OOps sorry, I misread what the problem was. Ignore me, I have a bad 
tooth and took a pain killer. Head's not working right.

Jim.
>>
>> 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.
>> ----------------------------------
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>>   
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
>   



More information about the Ale mailing list