Thu 09 Jul 2015 05:53:00 PM UTC, original submission:
When using a find command with about 10 -iregexp regular expressions arguments, one of them contained a typo.
I had to download and build the latest findutils distribution
to find out which one .
Please could you include something like the following patch
(made against GIT master of 2015-07-09) to tell users which -regexp or -iregexp argument was invalid:
--- find/parser.c~ 2015-07-09 18:44:19.787410855 +0100
+++ find/parser.c 2015-07-09 18:42:27.907153109 +0100
@@ -2115,7 +2115,7 @@
error_message = re_compile_pattern (rx, strlen (rx), re);
if (error_message)
- error (EXIT_FAILURE, 0, "%s", error_message);
+ error (EXIT_FAILURE, 0, "%s : %s", error_message, rx);
our_pred->est_success_rate = estimate_pattern_match_rate (rx, 1);
return true;
}
Really, the previous behavior was not very informative:
/usr/local/bin/find: Invalid preceding regular expression
Now it prints:
/usr/local/bin/find: Invalid preceding regular expression : [\#\~].
(I had left out the '.' prefix).
|