{"success":true,"data":{"ext":"awk","name":"AWK","description":"AWK is a text-processing scripting language and associated script file format originally created by Alfred Aho, Peter Weinberger, and Brian Kernighan at Bell Labs, with modern implementations maintained by projects such as GNU awk. It is used for pattern matching, report generation, data extraction, and automated text transformation in Unix and POSIX environments. The format is generally safe, though scripts should be reviewed because they can execute commands or process untrusted input.","mime":["text/x-awk"],"risk_level":"Safe","signatures":[{"hex":"23 21 2F 62 69 6E 2F 67 61 77 6B","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 62 69 6E 2F 67 61 77 6B","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 2F 75 73 72 2F 62 69 6E 2F 67 61 77 6B","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 75 73 72 2F 62 69 6E 2F 67 61 77 6B","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 2F 75 73 72 2F 6C 6F 63 61 6C 2F 62 69 6E 2F 67 61 77 6B","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 75 73 72 2F 6C 6F 63 61 6C 2F 62 69 6E 2F 67 61 77 6B","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 2F 62 69 6E 2F 61 77 6B","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 62 69 6E 2F 61 77 6B","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 2F 75 73 72 2F 62 69 6E 2F 61 77 6B","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 75 73 72 2F 62 69 6E 2F 61 77 6B","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":["py","php","pl","pm","bash","csh"],"usage":{"python":"def is_awk(file_path: str) -> bool:\n    \"\"\"Check if file is a valid AWK by magic bytes.\"\"\"\n    signature = bytes([0x23, 0x21, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x67, 0x61, 0x77, 0x6B])\n    with open(file_path, \"rb\") as f:\n        return f.read(11) == signature","node":"function isAWK(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x23, 0x21, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x67, 0x61, 0x77, 0x6B]);\n  return buffer.subarray(0, 11).equals(signature);\n}","go":"func IsAWK(data []byte) bool {\n    signature := []byte{0x23, 0x21, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x67, 0x61, 0x77, 0x6B}\n    if len(data) < 11 {\n        return false\n    }\n    return bytes.Equal(data[:11], signature)\n}"},"category":"Source Code"}}