--- magic/Magdir/commands +++ magic/Magdir/commands 2011-06-14 13:50:11.135927768 +0000 @@ -4,71 +4,71 @@ # commands: file(1) magic for various shells and interpreters # #0 string/w : shell archive or script for antique kernel text -0 string/wt #!\ /bin/sh POSIX shell script text executable +0 string/wt #!\ /bin/sh POSIX shell script text !:mime text/x-shellscript -0 string/wt #!\ /bin/csh C shell script text executable +0 string/wt #!\ /bin/csh C shell script text !:mime text/x-shellscript # korn shell magic, sent by George Wu, gwu@clyde.att.com -0 string/wt #!\ /bin/ksh Korn shell script text executable +0 string/wt #!\ /bin/ksh Korn shell script text !:mime text/x-shellscript -0 string/wt #!\ /bin/tcsh Tenex C shell script text executable +0 string/wt #!\ /bin/tcsh Tenex C shell script text !:mime text/x-shellscript -0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text executable +0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text !:mime text/x-shellscript -0 string/wt #!\ /usr/local/tcsh Tenex C shell script text executable +0 string/wt #!\ /usr/local/tcsh Tenex C shell script text !:mime text/x-shellscript -0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text executable +0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text !:mime text/x-shellscript # # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson) -0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text executable +0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text !:mime text/x-shellscript -0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable +0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text !:mime text/x-shellscript -0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable +0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text !:mime text/x-shellscript -0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable +0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text !:mime text/x-shellscript -0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable +0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text !:mime text/x-shellscript -0 string/wt #!\ /bin/nawk new awk script text executable +0 string/wt #!\ /bin/nawk new awk script text !:mime text/x-nawk -0 string/wt #!\ /usr/bin/nawk new awk script text executable +0 string/wt #!\ /usr/bin/nawk new awk script text !:mime text/x-nawk -0 string/wt #!\ /usr/local/bin/nawk new awk script text executable +0 string/wt #!\ /usr/local/bin/nawk new awk script text !:mime text/x-nawk -0 string/wt #!\ /bin/gawk GNU awk script text executable +0 string/wt #!\ /bin/gawk GNU awk script text !:mime text/x-gawk -0 string/wt #!\ /usr/bin/gawk GNU awk script text executable +0 string/wt #!\ /usr/bin/gawk GNU awk script text !:mime text/x-gawk -0 string/wt #!\ /usr/local/bin/gawk GNU awk script text executable +0 string/wt #!\ /usr/local/bin/gawk GNU awk script text !:mime text/x-gawk # -0 string/wt #!\ /bin/awk awk script text executable +0 string/wt #!\ /bin/awk awk script text !:mime text/x-awk -0 string/wt #!\ /usr/bin/awk awk script text executable +0 string/wt #!\ /usr/bin/awk awk script text !:mime text/x-awk 0 regex =^\\s*BEGIN\\s*[{] awk script text # AT&T Bell Labs' Plan 9 shell -0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable +0 string/wt #!\ /bin/rc Plan 9 rc shell script text # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) -0 string/wt #!\ /bin/bash Bourne-Again shell script text executable +0 string/wt #!\ /bin/bash Bourne-Again shell script text !:mime text/x-shellscript -0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text executable +0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text !:mime text/x-shellscript -0 string/wt #!\ /usr/local/bash Bourne-Again shell script text executable +0 string/wt #!\ /usr/local/bash Bourne-Again shell script text !:mime text/x-shellscript -0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable +0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text !:mime text/x-shellscript # using env 0 string/t #!/usr/bin/env a ->15 string/t >\0 %s script text executable +>15 string/t >\0 %s script text 0 string/t #!\ /usr/bin/env a ->16 string/t >\0 %s script text executable +>16 string/t >\0 %s script text # PHP scripts # Ulf Harnhammar @@ -78,9 +78,9 @@ !:mime text/x-php 0 search/1 = --- magic/Magdir/perl +++ magic/Magdir/perl 2009-05-05 12:01:34.000000000 +0000 @@ -6,15 +6,15 @@ # The `eval' lines recognizes an outrageously clever hack. # Keith Waclena # Send additions to -0 search/1/w #!\ /bin/perl Perl script text executable +0 search/1/w #!\ /bin/perl Perl script text !:mime text/x-perl 0 search/1 eval\ "exec\ /bin/perl Perl script text !:mime text/x-perl -0 search/1/w #!\ /usr/bin/perl Perl script text executable +0 search/1/w #!\ /usr/bin/perl Perl script text !:mime text/x-perl 0 search/1 eval\ "exec\ /usr/bin/perl Perl script text !:mime text/x-perl -0 search/1/w #!\ /usr/local/bin/perl Perl script text executable +0 search/1/w #!\ /usr/local/bin/perl Perl script text !:mime text/x-perl 0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text !:mime text/x-perl --- magic/Magdir/python +++ magic/Magdir/python 2011-06-14 13:51:01.507926101 +0000 @@ -5,7 +5,7 @@ # # From: David Necas # often the module starts with a multiline string -0 string/t """ a python script text executable +0 string/t """ a python script text # MAGIC as specified in Python/import.c (1.5 to 2.7a0 and 3.1a0, assuming # that Py_UnicodeFlag is off for Python 2) # 20121 ( YEAR - 1995 ) + MONTH + DAY (little endian followed by "\r\n" @@ -22,39 +22,39 @@ 0 belong 0x4f0c0d0a python 3.1 byte-compiled 0 belong 0x6c0c0d0a python 3.2 byte-compiled -0 search/1/w #!\ /usr/bin/python Python script text executable +0 search/1/w #!\ /usr/bin/python Python script text !:mime text/x-python -0 search/1/w #!\ /usr/local/bin/python Python script text executable +0 search/1/w #!\ /usr/local/bin/python Python script text !:mime text/x-python -0 search/1 #!/usr/bin/env\ python Python script text executable +0 search/1 #!/usr/bin/env\ python Python script text !:mime text/x-python -0 search/1 #!\ /usr/bin/env\ python Python script text executable +0 search/1 #!\ /usr/bin/env\ python Python script text !:mime text/x-python # from module.submodule import func1, func2 -0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable +0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text !:mime text/x-python # def __init__ (self, ...): 0 search/4096 def\ __init__ ->&0 search/64 self Python script text executable +>&0 search/64 self Python script text !:mime text/x-python # comments 0 search/4096 ''' ->&0 regex .*'''$ Python script text executable +>&0 regex .*'''$ Python script text !:mime text/x-python 0 search/4096 """ ->&0 regex .*"""$ Python script text executable +>&0 regex .*"""$ Python script text !:mime text/x-python # try: # except: or finally: # block 0 search/4096 try: ->&0 regex \^\\s*except.*: Python script text executable +>&0 regex \^\\s*except.*: Python script text !:mime text/x-python ->&0 search/4096 finally: Python script text executable +>&0 search/4096 finally: Python script text !:mime text/x-python --- magic/Magdir/varied.script +++ magic/Magdir/varied.script 2011-06-14 13:52:38.827926417 +0000 @@ -4,12 +4,12 @@ # varied.script: file(1) magic for various interpreter scripts 0 string/t #!\ / a ->3 string >\0 %s script text executable +>3 string >\0 %s script text 0 string/t #!\t/ a ->3 string >\0 %s script text executable +>3 string >\0 %s script text 0 string/t #!/ a ->2 string >\0 %s script text executable -0 string/t #!\ script text executable +>2 string >\0 %s script text +0 string/t #!\ script text >3 string >\0 for %s # From: arno