0

I'm trying to determine the encoding of a shell script. The following "file" command returns "application/x-shellscript". Is this the actual encoding? I was expecting a standard encoding such as "utf-8" or "ascii". What am I missing?

file --mime test.sh
test.sh: application/x-shellscript

EDIT: I moved the file over to my macbook and it worked:

file --mime test.sh
test.sh: text/x-shellscript; charset=us-ascii
4

1 回答 1

1

试试--mime-encoding开关:

file --mime-encoding test.sh
于 2013-03-18T21:31:12.070 回答