]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/file/magic/Magdir/commands
MFC r362258, r362279: file 5.39
[FreeBSD/FreeBSD.git] / contrib / file / magic / Magdir / commands
1
2 #------------------------------------------------------------------------------
3 # $File: commands,v 1.63 2020/06/06 15:36:30 christos Exp $
4 # commands:  file(1) magic for various shells and interpreters
5 #
6 #0      string/w        :                       shell archive or script for antique kernel text
7 0       string/wt       #!\ /bin/sh             POSIX shell script text executable
8 !:mime  text/x-shellscript
9 0       string/wb       #!\ /bin/sh             POSIX shell script executable (binary data)
10 !:mime  text/x-shellscript
11
12 0       string/wt       #!\ /bin/csh            C shell script text executable
13 !:mime  text/x-shellscript
14
15 # korn shell magic, sent by George Wu, gwu@clyde.att.com
16 0       string/wt       #!\ /bin/ksh            Korn shell script text executable
17 !:mime  text/x-shellscript
18 0       string/wb       #!\ /bin/ksh            Korn shell script executable (binary data)
19 !:mime  text/x-shellscript
20
21 0       string/wt       #!\ /bin/tcsh           Tenex C shell script text executable
22 !:mime  text/x-shellscript
23 0       string/wt       #!\ /usr/bin/tcsh       Tenex C shell script text executable
24 !:mime  text/x-shellscript
25 0       string/wt       #!\ /usr/local/tcsh     Tenex C shell script text executable
26 !:mime  text/x-shellscript
27 0       string/wt       #!\ /usr/local/bin/tcsh Tenex C shell script text executable
28 !:mime  text/x-shellscript
29
30 #
31 # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
32 0       string/wt       #!\ /bin/zsh            Paul Falstad's zsh script text executable
33 !:mime  text/x-shellscript
34 0       string/wt       #!\ /usr/bin/zsh        Paul Falstad's zsh script text executable
35 !:mime  text/x-shellscript
36 0       string/wt       #!\ /usr/local/bin/zsh  Paul Falstad's zsh script text executable
37 !:mime  text/x-shellscript
38 0       search/1        #!/usr/bin/env\ zsh     Paul Falstad's zsh script text executable
39 !:mime  text/x-shellscript
40
41 0       string/wt       #!\ /usr/local/bin/ash  Neil Brown's ash script text executable
42 !:mime  text/x-shellscript
43 0       string/wt       #!\ /usr/local/bin/ae   Neil Brown's ae script text executable
44 !:mime  text/x-shellscript
45 0       string/wt       #!\ /bin/nawk           new awk script text executable
46 !:mime  text/x-nawk
47 0       string/wt       #!\ /usr/bin/nawk       new awk script text executable
48 !:mime  text/x-nawk
49 0       string/wt       #!\ /usr/local/bin/nawk new awk script text executable
50 !:mime  text/x-nawk
51 0       string/wt       #!\ /bin/gawk           GNU awk script text executable
52 !:mime  text/x-gawk
53 0       string/wt       #!\ /usr/bin/gawk       GNU awk script text executable
54 !:mime  text/x-gawk
55 0       string/wt       #!\ /usr/local/bin/gawk GNU awk script text executable
56 !:mime  text/x-gawk
57 #
58 0       string/wt       #!\ /bin/awk            awk script text executable
59 !:mime  text/x-awk
60 0       string/wt       #!\ /usr/bin/awk        awk script text executable
61 !:mime  text/x-awk
62 0       regex/4096      =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{]    awk or perl script text
63
64 # AT&T Bell Labs' Plan 9 shell
65 0       string/wt       #!\ /bin/rc     Plan 9 rc shell script text executable
66
67 # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
68 0       string/wt       #!\ /bin/bash   Bourne-Again shell script text executable
69 !:mime  text/x-shellscript
70 0       string/wb       #!\ /bin/bash   Bourne-Again shell script executable (binary data)
71 !:mime  text/x-shellscript
72 0       string/wt       #!\ /usr/bin/bash       Bourne-Again shell script text executable
73 !:mime  text/x-shellscript
74 0       string/wb       #!\ /usr/bin/bash       Bourne-Again shell script executable (binary data)
75 !:mime  text/x-shellscript
76 0       string/wt       #!\ /usr/local/bash     Bourne-Again shell script text executable
77 !:mime  text/x-shellscript
78 0       string/wb       #!\ /usr/local/bash     Bourne-Again shell script executable (binary data)
79 !:mime  text/x-shellscript
80 0       string/wt       #!\ /usr/local/bin/bash Bourne-Again shell script text executable
81 !:mime  text/x-shellscript
82 0       string/wb       #!\ /usr/local/bin/bash Bourne-Again shell script executable (binary data)
83 !:mime  text/x-shellscript
84 0       string/wt       #!\ /usr/bin/env\ bash  Bourne-Again shell script text executable
85 !:mime  text/x-shellscript
86
87 # Fish shell magic
88 # From: Benjamin Lowry <ben@ben.gmbh>
89 0       string/wt       #!\ /usr/local/bin/fish         fish shell script text executable
90 !:mime  text/x-shellscript
91 0       string/wt       #!\ /usr/bin/fish               fish shell script text executable
92 !:mime  text/x-shellscript
93 0       string/wt       #!\ /usr/bin/env\ fish          fish shell script text executable
94 !:mime  text/x-shellscript
95
96
97 0       search/1/wt     #!\ /usr/bin/tclsh      Tcl/Tk script text executable
98 !:mime  text/x-tcl
99
100 0       search/1/wt     #!\ /usr/bin/texlua     LuaTex script text executable
101 !:mime  text/x-luatex
102
103 0       search/1/wt     #!\ /usr/bin/luatex     LuaTex script text executable
104 !:mime  text/x-luatex
105
106 0       search/1/wt     #!\ /usr/bin/stap       Systemtap script text executable
107 !:mime  text/x-systemtap
108
109
110
111 # PHP scripts
112 # Ulf Harnhammar <ulfh@update.uu.se>
113 0       search/1/c      =<?php                  PHP script text
114 !:strength + 30
115 !:mime  text/x-php
116 0       search/1        =<?\n                   PHP script text
117 !:mime  text/x-php
118 0       search/1        =<?\r                   PHP script text
119 !:mime  text/x-php
120 0       search/1/w      #!\ /usr/local/bin/php  PHP script text executable
121 !:strength + 10
122 !:mime  text/x-php
123 0       search/1/w      #!\ /usr/bin/php        PHP script text executable
124 !:strength + 10
125 !:mime  text/x-php
126 # Smarty compiled template, https://www.smarty.net/
127 # Elan Ruusamae <glen@delfi.ee>
128 0       string  =<?php
129 >5      regex   [\ \n]
130 >>6     string  /*\ Smarty\ version             Smarty compiled template
131 >>>24   regex   [0-9.]+                         \b, version %s
132 !:mime  text/x-php
133
134 0       string          Zend\x00                PHP script Zend Optimizer data
135
136 0       string/t        $!                      DCL command file
137
138 # Type: Pdmenu
139 # URL:  https://packages.debian.org/pdmenu
140 # From: Edward Betts <edward@debian.org>
141 0       string          #!/usr/bin/pdmenu       Pdmenu configuration file text
142
143 # From Danny Weldon
144 0       string  \x0b\x13\x08\x00
145 >0x04   uleshort        <4      ksh byte-code version %d