Gentoo Archives: gentoo-dev

From: Timothy Redaelli <drizzt@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] newins "-" for standard input?
Date: Mon, 23 Mar 2009 16:12:09
Message-Id: 200903231711.58676.drizzt@gentoo.org
In Reply to: [gentoo-dev] newins "-" for standard input? by Ulrich Mueller
1 On Monday 23 March 2009 09:22:06 Ulrich Mueller wrote:
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 Why can't you use "newins /dev/stdin foo" that it works out of the box?
20
21 --
22 Timothy `Drizzt` Redaelli
23 FreeSBIE Developer, Gentoo Developer, GUFI Staff
24 There are two major products that come out of Berkeley: LSD and UNIX.
25 We don't believe this to be a coincidence. -- Jeremy S. Anderson

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] newins "-" for standard input? Michael Haubenwallner <haubi@g.o>