Skip to content

1x should output empty line if input doesn't contain newline #306

Closed

Description

@cakebaker

GNU sed outputs an empty line with 1x if the input doesn't contain a newline. uutils sed, on the other hand, doesn't:

$ printf "abc" | sed 1x

$ 
$ printf "abc" | cargo run -q sed 1x
$

The exception is an empty string as input: in such a case there is no output.

$ printf "" | sed 1x
$ 
$ printf "" | cargo run -q sed 1x
$

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions