On Sun, Mar 28, 2010 at 01:12:16PM -0600, Tim Haley wrote:
> +        If the modification involved a change in the link count of a
> +        file, the change will be expressed as a delta within
> +        parentheses on the modification line.  Example outputs are
> +        below:
> +
> +         M       /myfiles/
> +         M       /myfiles/link_to_me   (+1)
> +         R       /myfiles/rename_me -> /myfiles/renamed
> +         -       /myfiles/delete_me
> +         +       /myfiles/new_file

Is there any escaping of whitespace and non-printable characters in the
pathnames?  If not then the above format is ambiguous and cannot be
safely scripted.

There are several ways that you could address that problem, such as
escaping (HTML/XML entities? backslash escapes? pick your poison),
adding a length field preceding either each path or each path that
contains whitespace, or use a multi-line (for renames) format with paths
being the last field such that you need only [backslash?-]escape
newlines.

Probably the simplest answer is backslash-escaping whitespace, since
shells can handle that trivially.  That is what I recommend.

Nico
-- 

Reply via email to