[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
g/x/s/x/x prints every substituted line twice
From: |
Douglas McIlroy |
Subject: |
g/x/s/x/x prints every substituted line twice |
Date: |
Fri, 19 Apr 2024 18:50:45 -0400 |
There's nothing special about all those x's. g/x/s/y/z misbehaves, too.
Related commands produce no such surprises:
s/x/x prints once if successful
s/x/x/ doesn't print
s/x/x/p prints once if successful
g/x/s/x/x/ doesn't print
g/x/s/x/x/p prints substituted lines once
observed in versions 1.18 and 1.20.1
Doug McIlroy
- g/x/s/x/x prints every substituted line twice,
Douglas McIlroy <=