Sign in

    head

    head command for MoonX.

    command-line
    moonx
    wasm
    Download zip
    Author
    Version
    0.2.1
    License
    Apache-2.0
    Last updated
    8 hours ago
    Downloads
    37

    Dependencies

    #head for moonx

    Version 0.2.1 behavior is documented here. The support record separates local verification from published MoonX behavior; moonx examples use registry releases.

    Print the first lines or bytes of files or stdin:

    printf '1\n2\n3\n' | moonx cli/head -n 2 moonx cli/head -c 16 data.bin

    Options: -n N first N records (default 10), -c N first N bytes, and -q/-v header control. -z makes line records NUL-terminated. Count values accept attached, separate, and long-option forms, the legacy -NUM spelling, negative counts to exclude the last NUM units, an explicit +NUM, and documented decimal, short binary, and IEC (KiB through QiB) size suffixes. The obsolete first-argument form supports its documented b/k/m units and c/l/q/v modifiers. The last -n/-c and -q/-v occurrence controls its mode.

    Positive prefixes stop after the requested quota. Negative record counts keep only the excluded suffix in memory; negative byte counts keep at most the requested suffix plus one input chunk.

    With no file operand, the command silently reads stdin until EOF or the quota is satisfied; terminal, pipe, redirection, and explicit - paths are clean.

    #Standalone metadata

    Standalone --version prints exactly head 0.2.1 followed by one newline. Standalone --help starts with Usage: head, lists both metadata options, and ends with a newline. Both write to stdout, leave stdin unread, and exit with status 0. Exact-version publication and verification remain recorded separately in the support record.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io