[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Inserting a <tab> into sed's replacement string



* bob parker (bob_parker@dodo.com.au) [030529 10:54]:
> I'm using Woody with Gnu sed version 3.02 (the default).
> 
> I want to be able to insert tab chars into the output lines eg
> 
> sed = somefile | sed 'N;s/\n/\t/'
> 
> just gives me the literal 't' immediately following the number at the start 
> of each line.
> 
> Attempting to actually type a tab key in the place of the '\t' in the 
> replacement string just has the xterm barfing and I get the same result if I 
> log on in a real terminal. So does attempting to insert Ctrl-I.

Try typing ctrl-v before the tab.  The ctrl-v allows you to insert the
next character you type literally, be it tab, newline, backspace,
whatever.

good times,
Vineet
-- 
http://www.doorstop.net/
-- 
http://www.debian.org/		Set your computer Free.

Attachment: pgpGnjqRuticj.pgp
Description: PGP signature


Reply to: