comments with '#' in --files-from

Felipe Alvarez felipe.alvarez at gmail.com
Mon Mar 9 21:44:39 GMT 2009


Felipe



On Tue, Mar 10, 2009 at 12:04 AM, Matt McCutchen <matt at mattmccutchen.net> wrote:
> On Mon, 2009-03-09 at 20:56 +1000, Felipe Alvarez wrote:
>> On Mon, Mar 9, 2009 at 3:36 PM, Matt McCutchen <matt at mattmccutchen.net> wrote:
>> > Since a major purpose of --files-from is to specify arbitrary filenames
>> > safely, I think comments should not be supported, at least not when
>> > --from0 is specified.  Wayne?  Once this is decided, I can make any
>> > necessary fixes.
>>
>> Couldn't # be escaped if it were present in an 'arbitrary' filename so
>> that a regular plain # would act as a comment?
>
> Yes, that convention would work, but I thought the point of --files-from
> was to avoid having to do such things.
>
> Note that if you want to use comments and don't have any filenames
> starting with #, you can easily strip the comments before passing the
> list to rsync:
>
> rsync --files-from=<(grep -v '^#' FILE) ...
>
> --
> Matt
>
>

A usable suggestions/alternative


More information about the rsync mailing list