xref: /freebsd/contrib/file/magic/Magdir/commands (revision 580744621f33383027108364dcadad718df46ffe)
1
2#------------------------------------------------------------------------------
3# $File: commands,v 1.61 2019/10/30 03:16:43 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
70	string/wt	#!\ /bin/sh		POSIX shell script text executable
8!:mime	text/x-shellscript
90	string/wb	#!\ /bin/sh		POSIX shell script executable (binary data)
10!:mime	text/x-shellscript
11
120	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
160	string/wt	#!\ /bin/ksh		Korn shell script text executable
17!:mime	text/x-shellscript
180	string/wb	#!\ /bin/ksh		Korn shell script executable (binary data)
19!:mime	text/x-shellscript
20
210	string/wt 	#!\ /bin/tcsh		Tenex C shell script text executable
22!:mime	text/x-shellscript
230	string/wt	#!\ /usr/bin/tcsh	Tenex C shell script text executable
24!:mime	text/x-shellscript
250	string/wt 	#!\ /usr/local/tcsh	Tenex C shell script text executable
26!:mime	text/x-shellscript
270	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)
320	string/wt	#!\ /bin/zsh		Paul Falstad's zsh script text executable
33!:mime	text/x-shellscript
340	string/wt	#!\ /usr/bin/zsh	Paul Falstad's zsh script text executable
35!:mime	text/x-shellscript
360	string/wt	#!\ /usr/local/bin/zsh	Paul Falstad's zsh script text executable
37!:mime	text/x-shellscript
380	search/1	#!/usr/bin/env\ zsh	Paul Falstad's zsh script text executable
39!:mime	text/x-shellscript
40
410	string/wt	#!\ /usr/local/bin/ash	Neil Brown's ash script text executable
42!:mime	text/x-shellscript
430	string/wt	#!\ /usr/local/bin/ae	Neil Brown's ae script text executable
44!:mime	text/x-shellscript
450	string/wt	#!\ /bin/nawk		new awk script text executable
46!:mime	text/x-nawk
470	string/wt	#!\ /usr/bin/nawk	new awk script text executable
48!:mime	text/x-nawk
490	string/wt	#!\ /usr/local/bin/nawk	new awk script text executable
50!:mime	text/x-nawk
510	string/wt	#!\ /bin/gawk		GNU awk script text executable
52!:mime	text/x-gawk
530	string/wt	#!\ /usr/bin/gawk	GNU awk script text executable
54!:mime	text/x-gawk
550	string/wt	#!\ /usr/local/bin/gawk	GNU awk script text executable
56!:mime	text/x-gawk
57#
580	string/wt	#!\ /bin/awk		awk script text executable
59!:mime	text/x-awk
600	string/wt	#!\ /usr/bin/awk	awk script text executable
61!:mime	text/x-awk
620	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
650	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)
680	string/wt	#!\ /bin/bash	Bourne-Again shell script text executable
69!:mime	text/x-shellscript
700	string/wb	#!\ /bin/bash	Bourne-Again shell script executable (binary data)
71!:mime	text/x-shellscript
720	string/wt	#!\ /usr/bin/bash	Bourne-Again shell script text executable
73!:mime	text/x-shellscript
740	string/wb	#!\ /usr/bin/bash	Bourne-Again shell script executable (binary data)
75!:mime	text/x-shellscript
760	string/wt	#!\ /usr/local/bash	Bourne-Again shell script text executable
77!:mime	text/x-shellscript
780	string/wb	#!\ /usr/local/bash	Bourne-Again shell script executable (binary data)
79!:mime	text/x-shellscript
800	string/wt	#!\ /usr/local/bin/bash	Bourne-Again shell script text executable
81!:mime	text/x-shellscript
820	string/wb	#!\ /usr/local/bin/bash	Bourne-Again shell script executable (binary data)
83!:mime	text/x-shellscript
840	string/wt	#!\ /usr/bin/env\ bash	Bourne-Again shell script text executable
85!:mime	text/x-shellscript
86
87# PHP scripts
88# Ulf Harnhammar <ulfh@update.uu.se>
890	search/1/c	=<?php			PHP script text
90!:strength + 30
91!:mime	text/x-php
920	search/1	=<?\n			PHP script text
93!:mime	text/x-php
940	search/1	=<?\r			PHP script text
95!:mime	text/x-php
960	search/1/w	#!\ /usr/local/bin/php	PHP script text executable
97!:strength + 10
98!:mime	text/x-php
990	search/1/w	#!\ /usr/bin/php	PHP script text executable
100!:strength + 10
101!:mime	text/x-php
102# Smarty compiled template, https://www.smarty.net/
103# Elan Ruusamae <glen@delfi.ee>
1040	string	=<?php
105>5	regex	[\ \n]
106>>6	string	/*\ Smarty\ version		Smarty compiled template
107>>>24	regex	[0-9.]+				\b, version %s
108!:mime	text/x-php
109
1100	string		Zend\x00		PHP script Zend Optimizer data
111
1120	string/t	$!			DCL command file
113
114# Type: Pdmenu
115# URL:  https://packages.debian.org/pdmenu
116# From: Edward Betts <edward@debian.org>
1170	string		#!/usr/bin/pdmenu	Pdmenu configuration file text
118
119# From Danny Weldon
1200	string	\x0b\x13\x08\x00
121>0x04   uleshort	<4      ksh byte-code version %d
122