1b6cee71dSXin LI 2b6cee71dSXin LI#------------------------------------------------------------------------------ 3*43a5ec4eSXin LI# $File: commands,v 1.66 2021/07/03 13:50:29 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 7*43a5ec4eSXin LI0 string/fwt #!\ /bin/sh POSIX shell script text executable 8b6cee71dSXin LI!:mime text/x-shellscript 9*43a5ec4eSXin LI0 string/fwb #!\ /bin/sh POSIX shell script executable (binary data) 10b6cee71dSXin LI!:mime text/x-shellscript 11b6cee71dSXin LI 12*43a5ec4eSXin LI0 string/fwt #!\ /bin/csh C shell script text executable 13b6cee71dSXin LI!:mime text/x-shellscript 14b6cee71dSXin LI 15b6cee71dSXin LI# korn shell magic, sent by George Wu, gwu@clyde.att.com 16*43a5ec4eSXin LI0 string/fwt #!\ /bin/ksh Korn shell script text executable 17b6cee71dSXin LI!:mime text/x-shellscript 18*43a5ec4eSXin LI0 string/fwb #!\ /bin/ksh Korn shell script executable (binary data) 19b6cee71dSXin LI!:mime text/x-shellscript 20b6cee71dSXin LI 21*43a5ec4eSXin LI0 string/fwt #!\ /bin/tcsh Tenex C shell script text executable 22b6cee71dSXin LI!:mime text/x-shellscript 23*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/tcsh Tenex C shell script text executable 24b6cee71dSXin LI!:mime text/x-shellscript 25*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/tcsh Tenex C shell script text executable 26b6cee71dSXin LI!:mime text/x-shellscript 27*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/tcsh Tenex C shell script text executable 28b6cee71dSXin LI!:mime text/x-shellscript 29b6cee71dSXin LI 30b6cee71dSXin LI# 31b6cee71dSXin LI# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson) 32*43a5ec4eSXin LI0 string/fwt #!\ /bin/zsh Paul Falstad's zsh script text executable 33b6cee71dSXin LI!:mime text/x-shellscript 34*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable 35b6cee71dSXin LI!:mime text/x-shellscript 36*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable 37b6cee71dSXin LI!:mime text/x-shellscript 38d38c30c0SXin LI0 search/1 #!/usr/bin/env\ zsh Paul Falstad's zsh script text executable 39d38c30c0SXin LI!:mime text/x-shellscript 40d38c30c0SXin LI 41*43a5ec4eSXin LI0 string/fwt #!\ /bin/ash Neil Brown's ash script text executable 42b6cee71dSXin LI!:mime text/x-shellscript 43*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/ash Neil Brown's ash script text executable 44b6cee71dSXin LI!:mime text/x-shellscript 45*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/ash Neil Brown's ash script text executable 46*43a5ec4eSXin LI!:mime text/x-shellscript 47*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/ae Neil Brown's ae script text executable 48*43a5ec4eSXin LI!:mime text/x-shellscript 49*43a5ec4eSXin LI0 string/fwt #!\ /bin/nawk new awk script text executable 50b6cee71dSXin LI!:mime text/x-nawk 51*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/nawk new awk script text executable 52b6cee71dSXin LI!:mime text/x-nawk 53*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/nawk new awk script text executable 54b6cee71dSXin LI!:mime text/x-nawk 55*43a5ec4eSXin LI0 string/fwt #!\ /bin/gawk GNU awk script text executable 56b6cee71dSXin LI!:mime text/x-gawk 57b6cee71dSXin LI0 string/wt #!\ /usr/bin/gawk GNU awk script text executable 58b6cee71dSXin LI!:mime text/x-gawk 59*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/gawk GNU awk script text executable 60b6cee71dSXin LI!:mime text/x-gawk 61b6cee71dSXin LI# 62*43a5ec4eSXin LI0 string/fwt #!\ /bin/awk awk script text executable 63b6cee71dSXin LI!:mime text/x-awk 64*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/awk awk script text executable 65b6cee71dSXin LI!:mime text/x-awk 6640427ccaSGordon Tetlow0 regex/4096 =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{] awk or perl script text 67b6cee71dSXin LI 68b6cee71dSXin LI# AT&T Bell Labs' Plan 9 shell 69*43a5ec4eSXin LI0 string/fwt #!\ /bin/rc Plan 9 rc shell script text executable 70b6cee71dSXin LI 71b6cee71dSXin LI# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de) 72*43a5ec4eSXin LI0 string/fwt #!\ /bin/bash Bourne-Again shell script text executable 73b6cee71dSXin LI!:mime text/x-shellscript 74*43a5ec4eSXin LI0 string/fwb #!\ /bin/bash Bourne-Again shell script executable (binary data) 75b6cee71dSXin LI!:mime text/x-shellscript 76*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/bash Bourne-Again shell script text executable 77b6cee71dSXin LI!:mime text/x-shellscript 78*43a5ec4eSXin LI0 string/fwb #!\ /usr/bin/bash Bourne-Again shell script executable (binary data) 79b6cee71dSXin LI!:mime text/x-shellscript 80*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bash Bourne-Again shell script text executable 81b6cee71dSXin LI!:mime text/x-shellscript 82*43a5ec4eSXin LI0 string/fwb #!\ /usr/local/bash Bourne-Again shell script executable (binary data) 83b6cee71dSXin LI!:mime text/x-shellscript 84*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/bash Bourne-Again shell script text executable 85b6cee71dSXin LI!:mime text/x-shellscript 86*43a5ec4eSXin LI0 string/fwb #!\ /usr/local/bin/bash Bourne-Again shell script executable (binary data) 87b6cee71dSXin LI!:mime text/x-shellscript 88*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable 895f0216bdSXin LI!:mime text/x-shellscript 90b6cee71dSXin LI 912726a701SXin LI# Fish shell magic 922726a701SXin LI# From: Benjamin Lowry <ben@ben.gmbh> 93*43a5ec4eSXin LI0 string/fwt #!\ /usr/local/bin/fish fish shell script text executable 942726a701SXin LI!:mime text/x-shellscript 95*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/fish fish shell script text executable 962726a701SXin LI!:mime text/x-shellscript 97*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/env\ fish fish shell script text executable 982726a701SXin LI!:mime text/x-shellscript 992726a701SXin LI 100*43a5ec4eSXin LI0 string/wt #!\ a 101*43a5ec4eSXin LI>&-1 string x %s script text executable 1022726a701SXin LI 103*43a5ec4eSXin LI0 search/1/fwt #!\ /usr/bin/tclsh Tcl/Tk script text executable 1042726a701SXin LI!:mime text/x-tcl 1052726a701SXin LI 106*43a5ec4eSXin LI0 search/1/fwt #!\ /usr/bin/texlua LuaTex script text executable 1072726a701SXin LI!:mime text/x-luatex 1082726a701SXin LI 109*43a5ec4eSXin LI0 search/1/fwt #!\ /usr/bin/luatex LuaTex script text executable 1102726a701SXin LI!:mime text/x-luatex 1112726a701SXin LI 112*43a5ec4eSXin LI0 search/1/fwt #!\ /usr/bin/stap Systemtap script text executable 1132726a701SXin LI!:mime text/x-systemtap 1142726a701SXin LI 115*43a5ec4eSXin LI# From: Kylie McClain <kylie@somas.is> 116*43a5ec4eSXin LI# Type: execline scripts 117*43a5ec4eSXin LI# URL: https://skarnet.org/software/execline/ 118*43a5ec4eSXin LI0 string/fwt #!\ /command/execlineb execline script text executable 119*43a5ec4eSXin LI!:mime text/x-execline 120*43a5ec4eSXin LI0 string/fwt #!\ /bin/execlineb execline script text executable 121*43a5ec4eSXin LI!:mime text/x-execline 122*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/execlineb execline script text executable 123*43a5ec4eSXin LI!:mime text/x-execline 124*43a5ec4eSXin LI0 string/fwt #!\ /usr/bin/env\ execlineb execline script text executable 125*43a5ec4eSXin LI!:mime text/x-execline 1262726a701SXin LI 127*43a5ec4eSXin LI0 string #! 128*43a5ec4eSXin LI>0 regex \^#!.*/bin/execlineb([[:space:]].*)*$ execline script text executable 129*43a5ec4eSXin LI!:mime text/x-execline 1302726a701SXin LI 131b6cee71dSXin LI# PHP scripts 132b6cee71dSXin LI# Ulf Harnhammar <ulfh@update.uu.se> 133b6cee71dSXin LI0 search/1/c =<?php PHP script text 13440427ccaSGordon Tetlow!:strength + 30 135b6cee71dSXin LI!:mime text/x-php 136b6cee71dSXin LI0 search/1 =<?\n PHP script text 137b6cee71dSXin LI!:mime text/x-php 138b6cee71dSXin LI0 search/1 =<?\r PHP script text 139b6cee71dSXin LI!:mime text/x-php 140b6cee71dSXin LI0 search/1/w #!\ /usr/local/bin/php PHP script text executable 141b6cee71dSXin LI!:strength + 10 142b6cee71dSXin LI!:mime text/x-php 143b6cee71dSXin LI0 search/1/w #!\ /usr/bin/php PHP script text executable 144b6cee71dSXin LI!:strength + 10 145b6cee71dSXin LI!:mime text/x-php 14648c779cdSXin LI# Smarty compiled template, https://www.smarty.net/ 147b6cee71dSXin LI# Elan Ruusamae <glen@delfi.ee> 1483e41d09dSXin LI0 string =<?php 1493e41d09dSXin LI>5 regex [\ \n] 1503e41d09dSXin LI>>6 string /*\ Smarty\ version Smarty compiled template 15120f8619dSXin LI>>>24 regex [0-9.]+ \b, version %s 152b6cee71dSXin LI!:mime text/x-php 153b6cee71dSXin LI 154b6cee71dSXin LI0 string Zend\x00 PHP script Zend Optimizer data 155b6cee71dSXin LI 156b6cee71dSXin LI0 string/t $! DCL command file 157b6cee71dSXin LI 158b6cee71dSXin LI# Type: Pdmenu 15948c779cdSXin LI# URL: https://packages.debian.org/pdmenu 160b6cee71dSXin LI# From: Edward Betts <edward@debian.org> 161b6cee71dSXin LI0 string #!/usr/bin/pdmenu Pdmenu configuration file text 162a5d223e6SXin LI 163a5d223e6SXin LI# From Danny Weldon 164a5d223e6SXin LI0 string \x0b\x13\x08\x00 165a5d223e6SXin LI>0x04 uleshort <4 ksh byte-code version %d 166