Re: [dev] [sbase] Command list

From: Evan Gates <>
Date: Fri, 18 Oct 2013 13:31:31 -0700

> du -a | cut -f2 | filter test -w

I also find it worth mentioning that newline delimited lists of
filenames are not safe as newlines are legal in filenames. This also
disregards the possibility of tabs in filenames (and many other
solutions run into problems with whitespace as well).

find -exec and shell globs are good solutions as they don't depend on
printing and then reading a list of files. find -print0 may be
acceptable, but is not portable. xargs runs into many of the same
problems. (If you want to be POSIX compatible and feel that you must
print and read paths, try find ././ and use "././" as a separator. But
man is that gross.)

I vaguely recall reading about a set of tools that someone was writing
(I think it was cls?) that solved many of these problems by using
environment variables RS and FS or similar (like awk) to format their
output. Seeing as sbase is not aiming for POSIX compliance perhaps
something along these lines is worth considering?

Received on Fri Oct 18 2013 - 22:31:31 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 18 2013 - 22:36:15 CEST