9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] sed bug?
@ 2018-11-13 19:32 umbraticus
  2018-11-13 20:04 ` Joe M
  0 siblings, 1 reply; 8+ messages in thread
From: umbraticus @ 2018-11-13 19:32 UTC (permalink / raw)
  To: 9front

> This works fine, it outputs test2
> {echo test; echo test1; echo test2} | sed '0,/^test1$/d'

really? I get: sed: line number 0 is illegal

for this one: 

>{echo test; echo test1; echo test2} | sed '1,/^test$/d' # has no output

it deletes line 1, then continues deleting lines until it finds ^test$
which it never does. Perhaps adding a newline at the start is the quickest
way to get what you want?

{echo; echo test; echo test1; echo test2} | sed '1,/^test$/d'

test1
test2

umbraticus


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-11-13 21:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 19:32 [9front] sed bug? umbraticus
2018-11-13 20:04 ` Joe M
2018-11-13 20:28   ` Eckard Brauer
2018-11-13 20:32     ` Dave MacFarlane
2018-11-13 20:55       ` Eckard Brauer
2018-11-13 20:43     ` Antons Suspans
2018-11-13 21:07       ` Eckard Brauer
2018-11-13 21:09         ` Eckard Brauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).