simplemagic
simplemagic copied to clipboard
Bash script not recognized correctly
A simple bash script with this header:
#!/usr/bin/env bash
will result in a ContentInfo with
name: a
contentType: OTHER
mimeType: null
message: a b script text executable
whereas command line file
says Bourne-Again shell script, ASCII text executable
I used the same magic file for both simplemagic and file (/usr/share/file/magic
).
Having some arbitrary shebang:
$ cat xx
#!/some/executable
simplemagic gives a, type OTHER, msg 'a / script text executable'
, file gives:
$ file xx
xx: a /some/executable script, ASCII text executable