Sign in

    sed

    sed command for MoonX.

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

    Dependencies

    #sed

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

    Edit byte-oriented text streams with p, d, q, =, and substitution s/REGEXP/REPLACEMENT/. Read stdin when no input file is given or an operand is -. Multiple input files share line numbering, address ranges and the last-line address $.

    moonx cli/sed 's/old/new/g' file.txt moonx cli/sed -n '2,5p' file.txt moonx cli/sed -E 's/([0-9]+)/[\1]/g' file.txt

    -n/--quiet/--silent suppresses automatic output. Use repeated -e/--expression and -f/--file options to combine scripts in order. -E or -r selects extended regular expressions; basic expressions are the default. A first-line #n comment also disables automatic output.

    Addresses accept positive line numbers, $, /REGEXP/, two-address ranges and ! inversion. Substitution supports &, replacement captures \1 through \9, g, a positive occurrence number, and p. An empty expression reuses the last executed regular expression. Unterminated input records retain their missing final newline; later output inserts the required record separator.

    In-place editing, hold space, branches, command groups, multiline commands, pattern backreferences, word assertions and locale-aware matching are not included. Unsupported syntax is rejected before input is processed. --help and --version are available. Exit status is 0 on success, 1 for an invalid script or evaluation error, and 2 for an unreadable input file.

    #Standalone metadata

    Standalone --version prints exactly sed 0.1.1 followed by one newline. Standalone --help starts with Usage: sed, 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.

    Action

    type Action

    Address

    type Address

    Command

    type Command

    PatternRef

    type PatternRef

    Runtime

    type Runtime

    Script

    type Script

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io