{"success":true,"data":{"ext":"bash","name":"BASH","description":"BASH is a Unix shell scripting format associated with the GNU Bash interpreter, created and maintained by the GNU Project. It is used to automate command-line tasks, system administration, software installation, and build or deployment workflows on Unix-like operating systems. Scripts may execute arbitrary commands, so files from untrusted sources should be reviewed before use; the format remains widely supported and is not considered obsolete.","mime":["application/x-sh"],"risk_level":"Safe","signatures":[{"hex":"23 21 2F","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"23 21 20 2F","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"23 21 09 2F","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]},{"hex":"65 76 61 6C 20 22 65 78 65 63","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]}],"related":["sh","awk","csh","php","pl","pm"],"usage":{"python":"def is_bash(file_path: str) -> bool:\n    \"\"\"Check if file is a valid BASH by magic bytes.\"\"\"\n    signature = bytes([0x23, 0x21, 0x2F])\n    with open(file_path, \"rb\") as f:\n        return f.read(3) == signature","node":"function isBASH(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x23, 0x21, 0x2F]);\n  return buffer.subarray(0, 3).equals(signature);\n}","go":"func IsBASH(data []byte) bool {\n    signature := []byte{0x23, 0x21, 0x2F}\n    if len(data) < 3 {\n        return false\n    }\n    return bytes.Equal(data[:3], signature)\n}"},"category":"Source Code"}}