xref: /freebsd/contrib/file/magic/Magdir/varied.script (revision 4996ebdb720042239a197ebec2d265cdfdf1bbf3)
1#------------------------------------------------------------------------------
2# $File: varied.script,v 1.17 2025/03/10 20:41:09 christos Exp $
3# varied.script:  file(1) magic for various interpreter scripts
4
50	string		#![	Rust Source file
6!:ext rs
7
80	string/wt	#!\ 	a
9>&-1	string/T	x	%s script text executable
10!:strength / 3
11
120	string/wb	#!\ 	a
13>&-1	string/T	x	%s script executable (binary data)
14!:strength / 3
15
16
17# using env
180	regex/t		#![[:space:]]*/usr/bin/env[[:space:]]*	a
19>&0	string/T	>\0			%s script text executable
20!:strength / 2
21
220	regex/b		#![[:space:]]*/usr/bin/env[[:space:]]*	a
23>&0	string/T	>\0			%s script executable (binary data)
24!:strength / 2
25
26# using env
270	regex/t		#![[:space:]]*/usr/bin/env[[:space:]]*-[Si0]	a
28>&0	string/T	>\0			%s script text executable
29!:strength / 2
30
310	regex/b		#![[:space:]]*/usr/bin/env[[:space:]]*-[Si0]	a
32>&0	string/T	>\0			%s script executable (binary data)
33!:strength / 2
34