[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: '>;' redirection operator [was: [1003.1(2008)/Issue 7 0000530]: Supp
From: |
Bruce Korb |
Subject: |
Re: '>;' redirection operator [was: [1003.1(2008)/Issue 7 0000530]: Support in-place editing in sed (-iEXTENSION)] |
Date: |
Thu, 22 Dec 2011 14:09:30 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 |
On 12/22/11 13:03, Eric Blake wrote:
I assume on the ksh implementation that the temp file is discarded if
the command (simple or compound) feeding the redirection failed?
One would hope!
If the
redirection is used on a simple command, is there any shorthand for
specifying that the destination name on success also be fed as an
argument to the command, to avoid the redundancy of having to type
'file' both before and after the'>;' operator?
Doesn't the shell already have enough hieroglyphs? It is what
intimidates many folks from figuring it out.
I assume that this is
like any other redirection operator, where an optional fd number can be
prepended, as in '2>; file' to collect stderr and overwrite file on
success?
When the exact opposite is the useful variation? I.e. keep-on-failure.
"-i" for sed is simple, understandable and implemented a lot.
Please don't add another glyph to the standardized shell. Let us not
slide on slippery slopes. Shells can always add some useful builtins:
sh_move_if_changed
sh_save_on_success
sh_save_on_failure
to cope with this stuff. Or you can write your own such library for
your own use. ">;" is not an answer for sed-as-a-batch-editor anyway,
which is what "-i" really is.
- '>; ' redirection operator [was: [1003.1(2008)/Issue 7 0000530]: Support in-place editing in sed (-iEXTENSION)], Eric Blake, 2011/12/22
- Re: '>;' redirection operator [was: [1003.1(2008)/Issue 7 0000530]: Support in-place editing in sed (-iEXTENSION)],
Bruce Korb <=
- Re: '>;' redirection operator [was: [1003.1(2008)/Issue 7 0000530]: Support in-place editing in sed (-iEXTENSION)], Geir Hauge, 2011/12/22
- Re: '>;' redirection operator, Thorsten Glaser, 2011/12/24
- Re: '>;' redirection operator, Bill Gradwohl, 2011/12/24
- Re: '>;' redirection operator, Pierre Gaston, 2011/12/24
- Re: '>;' redirection operator, Chris Jones, 2011/12/24
- Re: '>;' redirection operator, Bill Gradwohl, 2011/12/24
- Re: '>;' redirection operator, Gerard Seibert, 2011/12/24
- Re: '>;' redirection operator, Roman Rakus, 2011/12/25