Re: I'm an idiot and sed proves it...
Dale Scheetz <firstname.lastname@example.org> wrote
> I've been trying to use sed to do some editing of simple characters from a
> large block of ascii text. The text has tabs that I wish to replace with
> spaces, and hyphonated words wrapped across linefeeds that I also wish to
> For the tabs, I try the following:
> sed -e 's/'\t'/ /g' <infile >outfile
> Which very cleanly places every t in the document with a space!??
> For the hyphonation I try:
> 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.
> I read the man page on sed, which pointed me to the backslash "special"
> characters, but gave no examples of their use. I have tried to figure this
> out looking at other examples, but am not making any headway.
> While I am positive that my problem is simple, I'm too much of an idiot to
> figure it out on my own. Can someone point me in the right direction?
sed -e 's/'\t'/ /g' <infile >outfile
try replacing the '\t' with control-V followed by a tab.
I'm not sure about how to unhyphenate words.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .