uutils/sed

POSIX mode incorrectly rejects i\(text) format

Open

#252 opened on Jan 11, 2026

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Rust (23 forks)github user discovery
good first issue

Repository metrics

Stars
 (91 stars)
PR merge metrics
 (Avg merge 6d 9h) (25 merged PRs in 30d)

Description

Rust (incorrect - returns error)

$ echo "test" | cargo run --quiet -- -n --posix -e 'i\(text'
 # Error: sed: <script argument 1>:1:3: error: extra characters after \ at the end of `i' command
 # Exit code: 1

GNU (correct)

  $ echo "test" | /usr/bin/sed -n --posix -e 'i\(text'
  # Output: (text
  # Exit code: 0

Bug Found by Fuzzer

Contributor guide