Skip to content

examples that combine -ne and $*ARGFILES.lines are wrong #27

@timo

Description

@timo

this concerns the second example of "number all lines in a file", "number all lines but print line numbers only for non-empty lines"

calling $*ARGFILES.lines will immediately eat up the rest of the incoming data, and the $_ will just contain the very first line. so what you end up with is first the whole rest of the file with line numbers in one line followed by the first line's content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions