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

Re: OT: line count in a Dir



Hi,

I said that my solution was portable.

-print0 and xargs -0 are NOT portable.  AIX 4.3.3.06 for one does not 
support xargs -0.

My solution(s) I can guarantee would run on SCO Xenix from 12 years
ago.  Having no idea what platform a user is on, it's best to 
be generic, and leave optomizations for the user to apply.

>From my checking, OpenBSD 2.6, Linux 6.2 appear to support 
the -print0 and xargs -0 flags..

Other than that, be warned, some patforms may not support them.
But it's good to point them out, just attach a caveat

Cheers,

> 
> On Mon, 22 Jan 2001, Steve Williams wrote:
> 
> > xargs also pukes if there are spaces in filenames... be warned...
> 
> You can get around this with `find -print0 | xargs -0` (with whatever
> other arguments).
> +------------------------------------------------------------------------+
> | Dave Taira <bodhi@hagakure.org>                2001.01.22/17:11:38 PST |
> | Morlock for Hire                                                       |
> +------------------------------------------------------------------------+
> | I have no sense of decency. That way my other senses are enhanced.     |
> |                                                 --found in a wav file  |
> +------------------------------------------------------------------------+
> 
> 
> 


-- 
	Steve Williams, Calgary, Alberta, Canada
	Genie Computer Systems Inc.
	steve@genie96.com

"A man doesn't begin to attain wisdom until he recognizes that he is 
 no longer indispensable."
- Admiral Richard E. Byrd ( 1888-1957 )