Re: I'm an idiot and sed proves it...
Nathan E Norman writes:
>
>On Wed, 26 Nov 1997, Dale Scheetz wrote:
>
>: On Wed, 26 Nov 1997, Aaron Denney wrote:
>:
>: > dwarf@polaris.net wrote:
>: > > sed -e 's/-'\n'//g' <infile >outfile
>: > >
>: > > and although the file gets slightly smaller (I didn't try to find out just
>: > > what had been removed) none of the hyphonated text is corrected.
>: >
>[ snip ]
>: > The \t is not quoted, but is interpreted by your shell, which replaces the \t
>: > with an actual t. If you take out the inner quotes, it should work:
>: > sed -e 's/\t/ /g' <infile >outfile
>: >
>: > This will pass an actual \t to sed, which will interpret it as a tab character.
>: >
[snip]
>
>ps I too thought sed interpreted a '\t' as a tab. Apparently this is
>not the case ... perl does, but sed does not. Oh well.
>
According to the sed man page:
\c Any backslash-escaped character c, except for `{',
'}', `(', `)', `<', `>', `|', and `+' matches
itself.
so \t = t to sed.
Brian
--
Mechanical Engineering servis@purdue.edu
Purdue University http://www.ecn.purdue.edu/~servis
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: