From d132c6e4546c3a562f012229dcbab568f2ca195d Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Wed, 28 May 2014 19:52:36 +0000 Subject: [PATCH] further optimize awk by not looking for the BEGIN regex until we found the BEGIN (Jan Kaluza) --- magic/Magdir/commands | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/magic/Magdir/commands b/magic/Magdir/commands index 670bbe29..d5d45047 100644 --- a/magic/Magdir/commands +++ b/magic/Magdir/commands @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: commands,v 1.48 2014/03/04 12:20:42 kim Exp $ +# $File: commands,v 1.49 2014/05/28 19:52:36 christos Exp $ # commands: file(1) magic for various shells and interpreters # #0 string/w : shell archive or script for antique kernel text @@ -56,7 +56,8 @@ !:mime text/x-awk 0 string/wt #!\ /usr/bin/awk awk script text executable !:mime text/x-awk -0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text +0 search/16384 BEGIN +>0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text # AT&T Bell Labs' Plan 9 shell 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable -- 2.49.0