On 01/07/2015 11:49 AM, Markus Elfring wrote:
> Hello,
> 
> I would like to use the find command together with
> the parameter "-print0". I want to split the search
> result into a few separate files.
> 
> A command like "split" supports to make pieces from
> an input by a line count.
> Do I read the current documentation correctly in
> the way that zero-terminated lines are not supported
> so far?
> http://www.gnu.org/software/coreutils/manual/html_node/split-invocation.html

Correct.  Patches welcome.  In the meantime:

> 
> Would you like to recommend any other software tools
> which provide the desired functionality for splitting
> of files which contain zero-terminated text lines?

If you don't mind a bit of glue work, you can achieve the same results
with existing tools:

tr '\n\0' '\0\n' < orig > mod
split mod mod.
for each f in mod.*; do
  tr '\n\0' '\0\n' < $f > orig.${f##*.}
done

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to