Gentoo Archives: gentoo-dev

From: "Tiziano Müller" <dev-zero@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] newins "-" for standard input?
Date: Mon, 23 Mar 2009 08:48:51
Message-Id: 1237798108.13132.20.camel@localhost
In Reply to: [gentoo-dev] newins "-" for standard input? by Ulrich Mueller
1 Am Montag, den 23.03.2009, 09:22 +0100 schrieb Ulrich Mueller:
2 > Now that "dosed" is going to be banned, what would people think of
3 > "newins" (and the other "new*" commands) accepting "-" as the first
4 > argument? I don't know how many usage cases there are, but the
5 > following are obvious:
6 >
7 > sed 's/quux/quuux/' foo | newins - foo
8 >
9 > It would allow for here documents:
10 >
11 > newins - bar <<-EOF
12 > # configuration file (for example)
13 > EOF
14 >
15 > or even:
16 >
17 > newins - baz <<<$'# a short\n# file'
18 >
19
20 I like it :-)

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] newins "-" for standard input? Ulrich Mueller <ulm@g.o>