xref: /freebsd/contrib/file/magic/Magdir/commands (revision ae316d1d1cffd71ab7751f94e10118777a88e027)
1b6cee71dSXin LI
2b6cee71dSXin LI#------------------------------------------------------------------------------
3*ae316d1dSXin LI# $File: commands,v 1.77 2024/11/10 16:55:15 christos Exp $
4b6cee71dSXin LI# commands:  file(1) magic for various shells and interpreters
5b6cee71dSXin LI#
6b6cee71dSXin LI#0	string/w	:			shell archive or script for antique kernel text
743a5ec4eSXin LI0	string/fwt	#!\ /bin/sh		POSIX shell script text executable
8b6cee71dSXin LI!:mime	text/x-shellscript
943a5ec4eSXin LI0	string/fwb	#!\ /bin/sh		POSIX shell script executable (binary data)
10b6cee71dSXin LI!:mime	text/x-shellscript
11898496eeSXin LI>10	string	#\040This\040script\040was\040generated\040using\040Makeself	\b, self-executable archive
12898496eeSXin LI>>53	string	x	\b, Makeself %s
13b6cee71dSXin LI
1443a5ec4eSXin LI0	string/fwt	#!\ /bin/csh		C shell script text executable
15b6cee71dSXin LI!:mime	text/x-shellscript
16b6cee71dSXin LI
17b6cee71dSXin LI# korn shell magic, sent by George Wu, gwu@clyde.att.com
1843a5ec4eSXin LI0	string/fwt	#!\ /bin/ksh		Korn shell script text executable
19b6cee71dSXin LI!:mime	text/x-shellscript
2043a5ec4eSXin LI0	string/fwb	#!\ /bin/ksh		Korn shell script executable (binary data)
21b6cee71dSXin LI!:mime	text/x-shellscript
22b6cee71dSXin LI
2343a5ec4eSXin LI0	string/fwt 	#!\ /bin/tcsh		Tenex C shell script text executable
24b6cee71dSXin LI!:mime	text/x-shellscript
2543a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/tcsh	Tenex C shell script text executable
26b6cee71dSXin LI!:mime	text/x-shellscript
2743a5ec4eSXin LI0	string/fwt 	#!\ /usr/local/tcsh	Tenex C shell script text executable
28b6cee71dSXin LI!:mime	text/x-shellscript
2943a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bin/tcsh	Tenex C shell script text executable
30b6cee71dSXin LI!:mime	text/x-shellscript
31b6cee71dSXin LI
32b6cee71dSXin LI#
33b6cee71dSXin LI# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
3443a5ec4eSXin LI0	string/fwt	#!\ /bin/zsh		Paul Falstad's zsh script text executable
35b6cee71dSXin LI!:mime	text/x-shellscript
3643a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/zsh	Paul Falstad's zsh script text executable
37b6cee71dSXin LI!:mime	text/x-shellscript
3843a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bin/zsh	Paul Falstad's zsh script text executable
39b6cee71dSXin LI!:mime	text/x-shellscript
40a4d6d3b8SXin LI0	string/fwt	#!\ /usr/bin/env\ zsh	Paul Falstad's zsh script text executable
41d38c30c0SXin LI!:mime	text/x-shellscript
42d38c30c0SXin LI
4343a5ec4eSXin LI0	string/fwt	#!\ /bin/ash		Neil Brown's ash script text executable
44b6cee71dSXin LI!:mime	text/x-shellscript
4543a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/ash	Neil Brown's ash script text executable
46b6cee71dSXin LI!:mime	text/x-shellscript
4743a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bin/ash	Neil Brown's ash script text executable
4843a5ec4eSXin LI!:mime	text/x-shellscript
4943a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bin/ae	Neil Brown's ae script text executable
5043a5ec4eSXin LI!:mime	text/x-shellscript
5143a5ec4eSXin LI0	string/fwt	#!\ /bin/nawk		new awk script text executable
52b6cee71dSXin LI!:mime	text/x-nawk
5343a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/nawk	new awk script text executable
54b6cee71dSXin LI!:mime	text/x-nawk
5543a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bin/nawk	new awk script text executable
56b6cee71dSXin LI!:mime	text/x-nawk
5743a5ec4eSXin LI0	string/fwt	#!\ /bin/gawk		GNU awk script text executable
58b6cee71dSXin LI!:mime	text/x-gawk
59b6cee71dSXin LI0	string/wt	#!\ /usr/bin/gawk	GNU awk script text executable
60b6cee71dSXin LI!:mime	text/x-gawk
6143a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bin/gawk	GNU awk script text executable
62b6cee71dSXin LI!:mime	text/x-gawk
63b6cee71dSXin LI#
6443a5ec4eSXin LI0	string/fwt	#!\ /bin/awk		awk script text executable
65b6cee71dSXin LI!:mime	text/x-awk
6643a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/awk	awk script text executable
67b6cee71dSXin LI!:mime	text/x-awk
6840427ccaSGordon Tetlow0	regex/4096	=^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{]	awk or perl script text
69b6cee71dSXin LI
70b6cee71dSXin LI# AT&T Bell Labs' Plan 9 shell
7143a5ec4eSXin LI0	string/fwt	#!\ /bin/rc	Plan 9 rc shell script text executable
72b6cee71dSXin LI
73b6cee71dSXin LI# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
7443a5ec4eSXin LI0	string/fwt	#!\ /bin/bash	Bourne-Again shell script text executable
75b6cee71dSXin LI!:mime	text/x-shellscript
7643a5ec4eSXin LI0	string/fwb	#!\ /bin/bash	Bourne-Again shell script executable (binary data)
77b6cee71dSXin LI!:mime	text/x-shellscript
7843a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/bash	Bourne-Again shell script text executable
79b6cee71dSXin LI!:mime	text/x-shellscript
8043a5ec4eSXin LI0	string/fwb	#!\ /usr/bin/bash	Bourne-Again shell script executable (binary data)
81b6cee71dSXin LI!:mime	text/x-shellscript
8243a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bash	Bourne-Again shell script text executable
83b6cee71dSXin LI!:mime	text/x-shellscript
8443a5ec4eSXin LI0	string/fwb	#!\ /usr/local/bash	Bourne-Again shell script executable (binary data)
85b6cee71dSXin LI!:mime	text/x-shellscript
8643a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bin/bash	Bourne-Again shell script text executable
87b6cee71dSXin LI!:mime	text/x-shellscript
8843a5ec4eSXin LI0	string/fwb	#!\ /usr/local/bin/bash	Bourne-Again shell script executable (binary data)
89b6cee71dSXin LI!:mime	text/x-shellscript
9043a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/env\ bash	Bourne-Again shell script text executable
915f0216bdSXin LI!:mime	text/x-shellscript
92*ae316d1dSXin LI0	string/fwt	#!\ /bin/env\ bash	Bourne-Again shell script text executable
93*ae316d1dSXin LI!:mime	text/x-shellscript
94*ae316d1dSXin LI
95*ae316d1dSXin LI0	string/fwt	#!\ /bin/dash	Dash shell script text executable
96*ae316d1dSXin LI!:mime	text/x-shellscript
97*ae316d1dSXin LI0	string/fwt	#!\ /usr/bin/dash	Dash shell script text executable
98*ae316d1dSXin LI!:mime	text/x-shellscript
99b6cee71dSXin LI
1002726a701SXin LI# Fish shell magic
1012726a701SXin LI# From: Benjamin Lowry <ben@ben.gmbh>
10243a5ec4eSXin LI0	string/fwt	#!\ /usr/local/bin/fish		fish shell script text executable
1032726a701SXin LI!:mime	text/x-shellscript
10443a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/fish		fish shell script text executable
1052726a701SXin LI!:mime	text/x-shellscript
10643a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/env\ fish		fish shell script text executable
1072726a701SXin LI!:mime	text/x-shellscript
1082726a701SXin LI
10943a5ec4eSXin LI0	search/1/fwt	#!\ /usr/bin/tclsh	Tcl/Tk script text executable
1102726a701SXin LI!:mime  text/x-tcl
1112726a701SXin LI
11243a5ec4eSXin LI0	search/1/fwt	#!\ /usr/bin/texlua	LuaTex script text executable
1132726a701SXin LI!:mime	text/x-luatex
1142726a701SXin LI
11543a5ec4eSXin LI0	search/1/fwt	#!\ /usr/bin/luatex	LuaTex script text executable
1162726a701SXin LI!:mime	text/x-luatex
1172726a701SXin LI
11843a5ec4eSXin LI0	search/1/fwt	#!\ /usr/bin/stap	Systemtap script text executable
1192726a701SXin LI!:mime  text/x-systemtap
120*ae316d1dSXin LI0	search/1/fwt	#!\ /sbin/openrc-run	OpenRC script text executable
121*ae316d1dSXin LI!:mime  text/x-shellscript
1222726a701SXin LI
12343a5ec4eSXin LI# From: Kylie McClain <kylie@somas.is>
12443a5ec4eSXin LI# Type: execline scripts
12543a5ec4eSXin LI# URL:  https://skarnet.org/software/execline/
12643a5ec4eSXin LI0	string/fwt	#!\ /command/execlineb		execline script text executable
12743a5ec4eSXin LI!:mime	text/x-execline
12843a5ec4eSXin LI0	string/fwt	#!\ /bin/execlineb		execline script text executable
12943a5ec4eSXin LI!:mime	text/x-execline
13043a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/execlineb		execline script text executable
13143a5ec4eSXin LI!:mime	text/x-execline
13243a5ec4eSXin LI0	string/fwt	#!\ /usr/bin/env\ execlineb		execline script text executable
13343a5ec4eSXin LI!:mime	text/x-execline
1342726a701SXin LI
13543a5ec4eSXin LI0	string	#!
13643a5ec4eSXin LI>0	regex	\^#!.*/bin/execlineb([[:space:]].*)*$	execline script text executable
13743a5ec4eSXin LI!:mime	text/x-execline
1382726a701SXin LI
139*ae316d1dSXin LI0	string	#!/nix/store/
140*ae316d1dSXin LI>&-11	string/T	x			a %s script text executable
141*ae316d1dSXin LI
142b6cee71dSXin LI# PHP scripts
143b6cee71dSXin LI# Ulf Harnhammar <ulfh@update.uu.se>
144b6cee71dSXin LI0	search/1/c	=<?php			PHP script text
14540427ccaSGordon Tetlow!:strength + 30
146b6cee71dSXin LI!:mime	text/x-php
147b6cee71dSXin LI0	search/1	=<?\n			PHP script text
148b6cee71dSXin LI!:mime	text/x-php
149b6cee71dSXin LI0	search/1	=<?\r			PHP script text
150b6cee71dSXin LI!:mime	text/x-php
151b6cee71dSXin LI0	search/1/w	#!\ /usr/local/bin/php	PHP script text executable
152b6cee71dSXin LI!:strength + 10
153b6cee71dSXin LI!:mime	text/x-php
154b6cee71dSXin LI0	search/1/w	#!\ /usr/bin/php	PHP script text executable
155b6cee71dSXin LI!:strength + 10
156b6cee71dSXin LI!:mime	text/x-php
15748c779cdSXin LI# Smarty compiled template, https://www.smarty.net/
158b6cee71dSXin LI# Elan Ruusamae <glen@delfi.ee>
1593e41d09dSXin LI0	string	=<?php
1603e41d09dSXin LI>5	regex	[\ \n]
1613e41d09dSXin LI>>6	string	/*\ Smarty\ version		Smarty compiled template
16220f8619dSXin LI>>>24	regex	[0-9.]+				\b, version %s
163b6cee71dSXin LI!:mime	text/x-php
164b6cee71dSXin LI
165b6cee71dSXin LI0	string		Zend\x00		PHP script Zend Optimizer data
166b6cee71dSXin LI
167a4d6d3b8SXin LI# From: Anatol Belski <ab@php.net>
168a4d6d3b8SXin LI0	string		OPCACHE
169a4d6d3b8SXin LI>7	ubyte		0			PHP opcache filecache data
170a4d6d3b8SXin LI
171a4d6d3b8SXin LI0	search/64	--TEST--
172a4d6d3b8SXin LI>16	search/64	--FILE--
173a4d6d3b8SXin LI>24	search/8192	--EXPECT		PHP core test
174a4d6d3b8SXin LI!:ext	phpt
175a4d6d3b8SXin LI
176a4d6d3b8SXin LI# https://www.php.net/manual/en/phar.fileformat.signature.php
177a4d6d3b8SXin LI-4	string		GBMB			PHP phar archive
178a4d6d3b8SXin LI>-8	ubyte		0x1			with MD5 signature
179a4d6d3b8SXin LI!:ext	phar
180a4d6d3b8SXin LI>-8	ubyte		0x2			with SHA1 signature
181a4d6d3b8SXin LI!:ext	phar
182a4d6d3b8SXin LI>-8	ubyte		0x3			with SHA256 signature
183a4d6d3b8SXin LI!:ext	phar
184a4d6d3b8SXin LI>-8	ubyte		0x4			with SHA512 signature
185a4d6d3b8SXin LI!:ext	phar
186a4d6d3b8SXin LI>-8	ubyte		0x10			with OpenSSL signature
187a4d6d3b8SXin LI!:ext	phar
188a4d6d3b8SXin LI>-8	ubyte		0x11			with OpenSSL SHA256 signature
189a4d6d3b8SXin LI!:ext	phar
190a4d6d3b8SXin LI>-8	ubyte		0x12			with OpenSSL SHA512 signature
191a4d6d3b8SXin LI!:ext	phar
192a4d6d3b8SXin LI
193b6cee71dSXin LI0	string/t	$!			DCL command file
194b6cee71dSXin LI
195b6cee71dSXin LI# Type: Pdmenu
19648c779cdSXin LI# URL:  https://packages.debian.org/pdmenu
197b6cee71dSXin LI# From: Edward Betts <edward@debian.org>
198b6cee71dSXin LI0	string		#!/usr/bin/pdmenu	Pdmenu configuration file text
199a5d223e6SXin LI
200a5d223e6SXin LI# From Danny Weldon
201a5d223e6SXin LI0	string	\x0b\x13\x08\x00
202a5d223e6SXin LI>0x04   uleshort	<4      ksh byte-code version %d
203898496eeSXin LI
204898496eeSXin LI# From: arno <arenevier@fdn.fr>
205898496eeSXin LI# mozilla xpconnect typelib
206898496eeSXin LI# see https://www.mozilla.org/scriptable/typelib_file.html
207898496eeSXin LI0	string 		XPCOM\nTypeLib\r\n\032		XPConnect Typelib
208898496eeSXin LI>0x10  byte        x       version %d
209898496eeSXin LI>>0x11 byte        x      \b.%d
210898496eeSXin LI
211898496eeSXin LI0	string/fwt	#!\ /usr/bin/env\ runghc	GHC script executable
212898496eeSXin LI0	string/fwt	#!\ /usr/bin/env\ runhaskell	Haskell script executable
213898496eeSXin LI0	string/fwt	#!\ /usr/bin/env\ julia	Julia script executable
214