simplemagic icon indicating copy to clipboard operation
simplemagic copied to clipboard

Bash script not recognized correctly

Open mduft opened this issue 5 years ago • 1 comments

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).

mduft avatar Feb 01 '19 13:02 mduft

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

mduft avatar Feb 01 '19 13:02 mduft