>According to [EMAIL PROTECTED] on 10/29/2006 5:56 AM: >>> This also works. >>> >>> find . -exec grep -q PATTERN {} \; -exec vi {} \; >>> >> >> No it doesn't because it issues a fresh instance of vi per file. > >Then use the POSIX-specified: >find . -exec grep -q PATTERN {} \; -exec vi {} + > >That will execute grep once per file, then aggregate the successful >matches into a single invocation of vi (assuming you don't exceed ARG_MAX >limits), properly accounting for spaces in filenames. >
But, given that find is clever enough to assemble arguments containing spaces into an arglist and feeding them to vi, why can't bash? Regards Bahser _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash