From: umbraticus@prosimetrum.com
To: 9front@9front.org
Subject: Re: [9front] sed bug?
Date: Wed, 14 Nov 2018 08:32:43 +1300 [thread overview]
Message-ID: <AB197762BC3998A98109E128E8622B00@prosimetrum.com> (raw)
In-Reply-To: 20181113170851.GA5870@master
> 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
next reply other threads:[~2018-11-13 19:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 19:32 umbraticus [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AB197762BC3998A98109E128E8622B00@prosimetrum.com \
--to=umbraticus@prosimetrum.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).