Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PR/263: peoro: Require that we have full word matches for interpreter…
…s. Add

a wild-card match for interpreters.
  • Loading branch information
zoulasc committed May 9, 2021
1 parent b1e3bf5 commit c07b2a1
Showing 1 changed file with 43 additions and 41 deletions.
84 changes: 43 additions & 41 deletions magic/Magdir/commands
@@ -1,113 +1,115 @@

#------------------------------------------------------------------------------
# $File: commands,v 1.64 2021/04/06 15:43:11 christos Exp $
# $File: commands,v 1.65 2021/05/09 22:39:11 christos Exp $
# commands: file(1) magic for various shells and interpreters
#
#0 string/w : shell archive or script for antique kernel text
0 string/wt #!\ /bin/sh POSIX shell script text executable
0 string/fwt #!\ /bin/sh POSIX shell script text executable
!:mime text/x-shellscript
0 string/wb #!\ /bin/sh POSIX shell script executable (binary data)
0 string/fwb #!\ /bin/sh POSIX shell script executable (binary data)
!:mime text/x-shellscript

0 string/wt #!\ /bin/csh C shell script text executable
0 string/fwt #!\ /bin/csh C shell script text executable
!:mime text/x-shellscript

# korn shell magic, sent by George Wu, gwu@clyde.att.com
0 string/wt #!\ /bin/ksh Korn shell script text executable
0 string/fwt #!\ /bin/ksh Korn shell script text executable
!:mime text/x-shellscript
0 string/wb #!\ /bin/ksh Korn shell script executable (binary data)
0 string/fwb #!\ /bin/ksh Korn shell script executable (binary data)
!:mime text/x-shellscript

0 string/wt #!\ /bin/tcsh Tenex C shell script text executable
0 string/fwt #!\ /bin/tcsh Tenex C shell script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text executable
0 string/fwt #!\ /usr/bin/tcsh Tenex C shell script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/tcsh Tenex C shell script text executable
0 string/fwt #!\ /usr/local/tcsh Tenex C shell script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text executable
0 string/fwt #!\ /usr/local/bin/tcsh Tenex C shell script text executable
!:mime text/x-shellscript

#
# zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text executable
0 string/fwt #!\ /bin/zsh Paul Falstad's zsh script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable
0 string/fwt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable
0 string/fwt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable
!:mime text/x-shellscript
0 search/1 #!/usr/bin/env\ zsh Paul Falstad's zsh script text executable
!:mime text/x-shellscript

0 string/wt #!\ /bin/ash Neil Brown's ash script text executable
0 string/fwt #!\ /bin/ash Neil Brown's ash script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/bin/ash Neil Brown's ash script text executable
0 string/fwt #!\ /usr/bin/ash Neil Brown's ash script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable
0 string/fwt #!\ /usr/local/bin/ash Neil Brown's ash script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable
0 string/fwt #!\ /usr/local/bin/ae Neil Brown's ae script text executable
!:mime text/x-shellscript
0 string/wt #!\ /bin/nawk new awk script text executable
0 string/fwt #!\ /bin/nawk new awk script text executable
!:mime text/x-nawk
0 string/wt #!\ /usr/bin/nawk new awk script text executable
0 string/fwt #!\ /usr/bin/nawk new awk script text executable
!:mime text/x-nawk
0 string/wt #!\ /usr/local/bin/nawk new awk script text executable
0 string/fwt #!\ /usr/local/bin/nawk new awk script text executable
!:mime text/x-nawk
0 string/wt #!\ /bin/gawk GNU awk script text executable
0 string/fwt #!\ /bin/gawk GNU awk script text executable
!:mime text/x-gawk
0 string/wt #!\ /usr/bin/gawk GNU awk script text executable
!:mime text/x-gawk
0 string/wt #!\ /usr/local/bin/gawk GNU awk script text executable
0 string/fwt #!\ /usr/local/bin/gawk GNU awk script text executable
!:mime text/x-gawk
#
0 string/wt #!\ /bin/awk awk script text executable
0 string/fwt #!\ /bin/awk awk script text executable
!:mime text/x-awk
0 string/wt #!\ /usr/bin/awk awk script text executable
0 string/fwt #!\ /usr/bin/awk awk script text executable
!:mime text/x-awk
0 regex/4096 =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{] awk or perl script text

# AT&T Bell Labs' Plan 9 shell
0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
0 string/fwt #!\ /bin/rc Plan 9 rc shell script text executable

# bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
0 string/wt #!\ /bin/bash Bourne-Again shell script text executable
0 string/fwt #!\ /bin/bash Bourne-Again shell script text executable
!:mime text/x-shellscript
0 string/wb #!\ /bin/bash Bourne-Again shell script executable (binary data)
0 string/fwb #!\ /bin/bash Bourne-Again shell script executable (binary data)
!:mime text/x-shellscript
0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text executable
0 string/fwt #!\ /usr/bin/bash Bourne-Again shell script text executable
!:mime text/x-shellscript
0 string/wb #!\ /usr/bin/bash Bourne-Again shell script executable (binary data)
0 string/fwb #!\ /usr/bin/bash Bourne-Again shell script executable (binary data)
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bash Bourne-Again shell script text executable
0 string/fwt #!\ /usr/local/bash Bourne-Again shell script text executable
!:mime text/x-shellscript
0 string/wb #!\ /usr/local/bash Bourne-Again shell script executable (binary data)
0 string/fwb #!\ /usr/local/bash Bourne-Again shell script executable (binary data)
!:mime text/x-shellscript
0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable
0 string/fwt #!\ /usr/local/bin/bash Bourne-Again shell script text executable
!:mime text/x-shellscript
0 string/wb #!\ /usr/local/bin/bash Bourne-Again shell script executable (binary data)
0 string/fwb #!\ /usr/local/bin/bash Bourne-Again shell script executable (binary data)
!:mime text/x-shellscript
0 string/wt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable
0 string/fwt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable
!:mime text/x-shellscript

# Fish shell magic
# From: Benjamin Lowry <ben@ben.gmbh>
0 string/wt #!\ /usr/local/bin/fish fish shell script text executable
0 string/fwt #!\ /usr/local/bin/fish fish shell script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/bin/fish fish shell script text executable
0 string/fwt #!\ /usr/bin/fish fish shell script text executable
!:mime text/x-shellscript
0 string/wt #!\ /usr/bin/env\ fish fish shell script text executable
0 string/fwt #!\ /usr/bin/env\ fish fish shell script text executable
!:mime text/x-shellscript

0 string/wt #!\ a
>&-1 string x %s script text executable

0 search/1/wt #!\ /usr/bin/tclsh Tcl/Tk script text executable
0 search/1/fwt #!\ /usr/bin/tclsh Tcl/Tk script text executable
!:mime text/x-tcl

0 search/1/wt #!\ /usr/bin/texlua LuaTex script text executable
0 search/1/fwt #!\ /usr/bin/texlua LuaTex script text executable
!:mime text/x-luatex

0 search/1/wt #!\ /usr/bin/luatex LuaTex script text executable
0 search/1/fwt #!\ /usr/bin/luatex LuaTex script text executable
!:mime text/x-luatex

0 search/1/wt #!\ /usr/bin/stap Systemtap script text executable
0 search/1/fwt #!\ /usr/bin/stap Systemtap script text executable
!:mime text/x-systemtap


Expand Down

0 comments on commit c07b2a1

Please sign in to comment.