[H-GEN] sed query
Greg Black
gjb at gbch.net
Wed May 7 00:17:37 EDT 2003
On 2003-05-07, Paul Gearon wrote:
> On Wed, 7 May 2003, Greg Black wrote:
> > $ sed 's/ /
> > > /g' < input_file
> >
> > The "> " is $PS2 in my shell; the newline is a literal newline.
> > This will always work (except where bugs in sed or unparseable
> > input cause it to fail).
>
> Actually, you need a \ before the newline [...]
Yes, you do. That's what comes of trying to edit stuff like
this when your head is rendered wooly by the 'flu. I had been
going to illustrate two things and cut the wrong stuff out when
I decided to shorten my message. Apologies to anybody who was
confused by my carelessness here.
> > If you don't have a "real editor" (e.g., emacs)...
>
> Oh no, you're not trying to open THAT can of worms again, are you? I'm
> getting sick of the "my editor is better than yours" arguments which start
> with pejorative comments like this.
You misunderstood my point. I put the words inside quotes to
make it clear that I had a special meaning -- I don't advocate
one equivalent tool over another unless there are technical
reasons for that. My point was simply that we need an editor
that can actually display the *exact* and *complete* content of
the data and I mentioned one example; I could equally well have
suggested ed, which can do this just as well, or any other
similarly capable editor.
> VI (the editor mentioned in Scott's
> email) can do whatever you want as well (including this). It's not better
> or worse, just different.
Since Scott had explicitly stated that vi could not display the
file, it would have been a little cruel to say that it could
(although I am sure it could, at least once the data was
truncated sufficiently, as suggested elsewhere in my message).
And really, unless I actually say "my editor is better than
yours", please don't go around claiming that I did say that.
It's not something that I do as a rule.
I might say "my car is better than yours" if yours is a new
Porsche 911 and I'm allowed to define "better" as "quicker
around the Morgan Park race track", but that would be something
I'd say in a different forum.
Greg
--
Greg Black <gjb at gbch.net> <http://www.gbch.net/gjb.html>
GPG signed mail preferred; further information in headers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 249 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20030507/39f3c451/attachment.sig>
More information about the General
mailing list