I've got that far: wc --files0-from=FILE
lets one get the word count of a list of files. Each entry in this list mus be terminated with an ASCII NUL character.
Question: A way to set a terminating character, such as NUL by hand, or something else? I found this here [quoted from the info wc
output]:
… produce a list of ASCII NUL terminated file names is with GNU
find', using its
-print0' predicate.
I found somebody saying the each file name is being terminated by an ASCII NUL character. Is it right that this fits to, say the output of ls
?
I know, one shouldn't parse ls
, but writing the output into a file to be read by wc
another time would be nice.
printf
command.printf '%s\000' *
takes the files in the current directory (thanks to '*') and prints each one appending a \000 (a NUL character) after it. – lgeorget Jun 16 '13 at 21:48wc --files0-from=<(find . -type f -print0)
– Nykakin Jun 17 '13 at 00:41