Skip to content

Commit

Permalink
Limit regex search for BEGIN to the first 4K of the file.
Browse files Browse the repository at this point in the history
  • Loading branch information
zoulasc committed May 30, 2014
1 parent 74cafd7 commit 71a8b6c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 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
Expand Down Expand Up @@ -56,8 +56,7 @@
!:mime text/x-awk
0 string/wt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
0 search/16384 BEGIN
>0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
0 regex/4096 =^\\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
Expand Down

0 comments on commit 71a8b6c

Please sign in to comment.