From: Uriel <uriel99@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] sed oddity
Date: Wed, 19 Aug 2009 12:35:09 +0200 [thread overview]
Message-ID: <5d375e920908190335v3789e656k46c4843a016a03bf@mail.gmail.com> (raw)
In-Reply-To: <df49a7370908180900g1d104e3m3cc6d7e6637da42e@mail.gmail.com>
On Tue, Aug 18, 2009 at 6:00 PM, roger peppe<rogpeppe@gmail.com> wrote:
> 2009/8/18 Uriel <uriel99@gmail.com>:
>> Interesting, this reminds me of a question I had: is there any command
>> that would read from stdin, and write to stdout, but if there was an
>> error when writing to stdout it would ignore it and continue reading
>> stdin? It is trivial to do it in C, but don't want to require an extra
>> program just to keep werc's error logs clean of spurious noise.
>
> it seems to me that dd -conv noerror
> should do what you're after, but a quick inspection
> of the source shows me that i'm wrong.
>
> i think that could be construed as a bug.
>
> gorka's suggestion isn't quite right, i think, as
> you probably do want the cat to terminate when it
> reads eof or an error,
Exactly.
> so something like:
>
> e = write
> while(~ $e write*){
> cat
> e = $status
> }
>
> might do the job better (untested).
Nice trick, will try it out, thanks!
uriel
next prev parent reply other threads:[~2009-08-19 10:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-18 14:41 hugo rivera
2009-08-18 14:55 ` Uriel
2009-08-18 15:25 ` Gorka Guardiola
2009-08-18 16:00 ` roger peppe
2009-08-19 10:35 ` Uriel [this message]
2009-08-18 15:38 ` erik quanstrom
2009-08-19 7:47 ` hugo rivera
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=5d375e920908190335v3789e656k46c4843a016a03bf@mail.gmail.com \
--to=uriel99@gmail.com \
--cc=9fans@9fans.net \
/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).