head

Print the first lines or bytes of inputs like head, runnable via moonx

head
coreutils
text
cli
wasm
Download zip
Author
Version
0.1.1
License
Apache-2.0
Last updated
22 hours ago
Downloads
5

Dependencies

#head for moonx

Print the first lines or bytes of files or stdin:

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

Options: -n N first N lines (default 10), -c N first N bytes, -q/-v control the ==> file <== headers shown for multiple files.

Input is streamed in fixed-size chunks and reading stops as soon as the quota is met, so heading a huge file (or an endless pipe) is instant and uses constant memory. Binary data passes through unchanged.

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io