xref: /freebsd/contrib/file/magic/Magdir/commands (revision 8ef24a0d4b28fe230e20637f56869cc4148cd2ca)
1
2#------------------------------------------------------------------------------
3# $File: commands,v 1.54 2016/04/19 13:40:02 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	string/wt	#!\ /usr/local/bin/ash	Neil Brown's ash script text executable
39!:mime	text/x-shellscript
400	string/wt	#!\ /usr/local/bin/ae	Neil Brown's ae script text executable
41!:mime	text/x-shellscript
420	string/wt	#!\ /bin/nawk		new awk script text executable
43!:mime	text/x-nawk
440	string/wt	#!\ /usr/bin/nawk	new awk script text executable
45!:mime	text/x-nawk
460	string/wt	#!\ /usr/local/bin/nawk	new awk script text executable
47!:mime	text/x-nawk
480	string/wt	#!\ /bin/gawk		GNU awk script text executable
49!:mime	text/x-gawk
500	string/wt	#!\ /usr/bin/gawk	GNU awk script text executable
51!:mime	text/x-gawk
520	string/wt	#!\ /usr/local/bin/gawk	GNU awk script text executable
53!:mime	text/x-gawk
54#
550	string/wt	#!\ /bin/awk		awk script text executable
56!:mime	text/x-awk
570	string/wt	#!\ /usr/bin/awk	awk script text executable
58!:mime	text/x-awk
590	regex/4096	=^\\s{0,100}BEGIN\\s{0,100}[{]	awk or perl script text
60
61# AT&T Bell Labs' Plan 9 shell
620	string/wt	#!\ /bin/rc	Plan 9 rc shell script text executable
63
64# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
650	string/wt	#!\ /bin/bash	Bourne-Again shell script text executable
66!:mime	text/x-shellscript
670	string/wb	#!\ /bin/bash	Bourne-Again shell script executable (binary data)
68!:mime	text/x-shellscript
690	string/wt	#!\ /usr/bin/bash	Bourne-Again shell script text executable
70!:mime	text/x-shellscript
710	string/wb	#!\ /usr/bin/bash	Bourne-Again shell script executable (binary data)
72!:mime	text/x-shellscript
730	string/wt	#!\ /usr/local/bash	Bourne-Again shell script text executable
74!:mime	text/x-shellscript
750	string/wb	#!\ /usr/local/bash	Bourne-Again shell script executable (binary data)
76!:mime	text/x-shellscript
770	string/wt	#!\ /usr/local/bin/bash	Bourne-Again shell script text executable
78!:mime	text/x-shellscript
790	string/wb	#!\ /usr/local/bin/bash	Bourne-Again shell script executable (binary data)
80!:mime	text/x-shellscript
810	string/wt	#!\ /usr/bin/env\ bash	Bourne-Again shell script text executable
82!:mime	text/x-shellscript
83
84# PHP scripts
85# Ulf Harnhammar <ulfh@update.uu.se>
860	search/1/c	=<?php			PHP script text
87!:strength + 10
88!:mime	text/x-php
890	search/1	=<?\n			PHP script text
90!:mime	text/x-php
910	search/1	=<?\r			PHP script text
92!:mime	text/x-php
930	search/1/w	#!\ /usr/local/bin/php	PHP script text executable
94!:strength + 10
95!:mime	text/x-php
960	search/1/w	#!\ /usr/bin/php	PHP script text executable
97!:strength + 10
98!:mime	text/x-php
99# Smarty compiled template, http://www.smarty.net/
100# Elan Ruusamae <glen@delfi.ee>
1010	string	=<?php
102>5	regex	[\ \n]
103>>6	string	/*\ Smarty\ version		Smarty compiled template
104>>>24	regex	[0-9.]+				\b, version %s
105!:mime	text/x-php
106
1070	string		Zend\x00		PHP script Zend Optimizer data
108
1090	string/t	$!			DCL command file
110
111# Type: Pdmenu
112# URL:  http://packages.debian.org/pdmenu
113# From: Edward Betts <edward@debian.org>
1140	string		#!/usr/bin/pdmenu	Pdmenu configuration file text
115