Skip to content

AWK (.awk)

.awk file signature | text/x-awk

Safe

Magic Bytes

Offset 0
23 21 2F 62 69 6E 2F 67 61 77 6B

Sources: Apache Tika

All Known Signatures

10 signature variants are documented for .awk files across multiple sources.

Hex Signature Offset Sources
23 21 2F 62 69 6E 2F 67 61 77 6B 0 Apache Tika
23 21 20 2F 62 69 6E 2F 67 61 77 6B 0 Apache Tika
23 21 2F 75 73 72 2F 62 69 6E 2F 67 61 77 6B 0 Apache Tika
23 21 20 2F 75 73 72 2F 62 69 6E 2F 67 61 77 6B 0 Apache Tika
23 21 2F 75 73 72 2F 6C 6F 63 61 6C 2F 62 69 6E 2F 67 61 77 6B 0 Apache Tika
23 21 20 2F 75 73 72 2F 6C 6F 63 61 6C 2F 62 69 6E 2F 67 61 77 6B 0 Apache Tika
23 21 2F 62 69 6E 2F 61 77 6B 0 Apache Tika
23 21 20 2F 62 69 6E 2F 61 77 6B 0 Apache Tika
23 21 2F 75 73 72 2F 62 69 6E 2F 61 77 6B 0 Apache Tika
23 21 20 2F 75 73 72 2F 62 69 6E 2F 61 77 6B 0 Apache Tika

Extension

.awk

MIME Type

text/x-awk

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .awk files in Python

Python
def is_awk(file_path: str) -> bool:
    """Check if file is a valid AWK by magic bytes."""
    signature = bytes([0x23, 0x21, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x67, 0x61, 0x77, 0x6B])
    with open(file_path, "rb") as f:
        return f.read(11) == signature

How to validate .awk files in Node.js

Node.js
function isAWK(buffer: Buffer): boolean {
  const signature = Buffer.from([0x23, 0x21, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x67, 0x61, 0x77, 0x6B]);
  return buffer.subarray(0, 11).equals(signature);
}

How to validate .awk files in Go

Go
func IsAWK(data []byte) bool {
    signature := []byte{0x23, 0x21, 0x2F, 0x62, 0x69, 0x6E, 0x2F, 0x67, 0x61, 0x77, 0x6B}
    if len(data) < 11 {
        return false
    }
    return bytes.Equal(data[:11], signature)
}

API Endpoint

GET /api/v1/awk
curl https://filesignature.org/api/v1/awk

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .awk file?

A .awk file is a AWK file.

What are the magic bytes for .awk files?

The magic bytes for AWK files are 23 21 2F 62 69 6E 2F 67 61 77 6B at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .awk file?

To validate a .awk file, read the first bytes of the file and compare them against the known magic bytes (23 21 2F 62 69 6E 2F 67 61 77 6B) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .awk files?

The primary MIME type for .awk files is text/x-awk.

Is it safe to open .awk files?

AWK (.awk) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.