Re: [PATCH] Ignore file filter
From: David Greaves <hidden>
Date: 2016-06-15 22:41:57
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