[Top][All Lists]

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

findutils: xargs patch to use newline as delim

From: Matthew Mueller
Subject: findutils: xargs patch to use newline as delim
Date: Thu, 14 Mar 2002 07:25:20 -0700
User-agent: Mutt/1.3.25i

Something that always bugged me is that xargs only has -0 or the default
of splitting on all whitespace, while many progs output data per-line
but don't have an option for null seperating.

Attached is a patch to add an option to xargs (--newline/--N) that
splits args on newlines.  It handles both \r and \n chars (Though it
does ignore empty lines, but the default mode does this too.  Could be
avoided without too much trouble but it would complicate supporting
mac/dos eol a little bit.  And I'm not sure whether that is the
desirable behaviour anyway.)  

The patch is against the debian findutils src package since it is much
newer than the tarball at ftp://ftp.gnu.org/pub/gnu/findutils

I also noticed that this idea is even mentioned in the TODO, so I
removed that in the patch (since it wouldn't be todo anymore).

Matthew Mueller

Attachment: xargs-newlinedelim.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]