On 4/22/2010 6:38 PM, Helmut Schneider wrote:
Actually it matches any string containing a minus followed by 1 or more
digits or dots, e.g. "file-4.24" but also "file-.".
I'd use "-(\d+\.)+\d+".
Thanks. It appears it's not the regex that's the problem, apparently
file changed the output of file -v from stdout to stderr between 4.21
and 4.24:
@@ -279,9 +257,9 @@ main(int argc, char *argv[])
flags |= MAGIC_DEVICES;
break;
case 'v':
- (void)fprintf(stdout, "%s-%d.%.2d\n", __progname,
+ (void)fprintf(stderr, "%s-%d.%.2d\n", __progname,
FILE_VERSION_MAJOR, patchlevel);
- (void)fprintf(stdout, "magic file from %s\n",
+ (void)fprintf(stderr, "magic file from %s\n",
magicfile);
return 1;
case 'z':
Pointer from a comment in
http://www.rasyid.net/2008/04/02/file1-na-not-installed-required-by-maia-mailguard/.