From: David Greaves Date: Fri, 13 May 2005 08:50:07 GMT Subject: Re: [PATCH] Ignore file filter Message-ID: <42846A3F.4030706@dgreaves.com> In-Reply-To: <7v64xodshs.fsf@assigned-by-dhcp.cox.net> Junio C Hamano wrote: >Just a half theoretical question. How well does this perform >when your filenames have: > > - ' ' (ASCII 0x20) > - '\t' (ASCII 0x09) > - '\n' (ASCII 0x0a) > - '`' (ASCII 0x60) backtick > - '$' (ASCII 0x24) dollar sign > >in them? Or is it the case that the rest of the Cogito is not >careful enough and it does not matter to be careful only in this >script? > > That's what the: zerosep=$'-d "\0"' is for. It looks like the shell 'read' doesn't honour it though - I couldn't make it work. However, thanks, after I fixed the quotes I missed in: -o \( $pass_files -eq 1 -a -f "$file" \) \ -o \( $pass_dirs -eq 1 -a -d "$file" \) \ -o \( $pass_links -eq 1 -a -h "$file" \) \ it handles all cases above except \n (of course) Frankly I think we're beyond shell programming and we should be using perl (IMHO as the 'best' and most portable text handler) It also has a *fantastic* test harness available. David