]> granicus.if.org Git - file/commitdiff
further optimize awk by not looking for the BEGIN regex until we found the
authorChristos Zoulas <christos@zoulas.com>
Wed, 28 May 2014 19:52:36 +0000 (19:52 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 28 May 2014 19:52:36 +0000 (19:52 +0000)
BEGIN (Jan Kaluza)

magic/Magdir/commands

index bfffdefe813cac3f7c7f51af529ddffb1c3e7c2d..26b2869c6d786f100498e52e8d1c7eb4304960a1 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: commands,v 1.47 2014/03/01 22:32:39 christos Exp $
+# $File: commands,v 1.48 2014/03/04 12:20:42 kim 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