[OT] sed question
drue at therub.org
Mon Mar 15 11:54:33 PST 2004
On Sun, Mar 14, 2004 at 04:30:40PM -0600, Steven N. Fettig wrote:
> Sorry for posting an off-topic question to the list, but this is
> somethin that has been driving me nuts for weeks now and I can't figure
> it out. I want to pass a text file through sed that replaces all
> whitespaces with a carriage return. I.e., if I have the file
> my_test_text_document.txt that is a few paragraphs of writing, I want to
> take the following input:
how about using ctrl-v to get a literal -
if you do ctrl-v, the next keystroke will be input in literally. so, do
sed 's/ /<ctrl-v><enter>/'
When I do that, it types in a "^M". That method also works well for
using sed to insert tabs.
> Steve Fettig
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions