[nycbug-talk] Re: Simple sed question

Marc Spitzer mspitzer
Fri Jan 7 13:09:17 EST 2005


On Fri, 7 Jan 2005 13:03:39 -0500, a nice bug <nycbug at hastek.com> wrote:
> Francisco:
> > New to sed/awk.. reading a book on them.
> > Trying to convert:
> > ### Text Text Text
> >
> > to
> > ###<tab>Text Text Text
> 
> 
> echo -e "Text Text Text" |sed -e 's/\(Text Text Text\)/\t\1/g'
> 

more of a sed job but I prefer awk

awk '{print "\t" $0 } '  file_name 

should work

marc

> Just a general example for the tab replacement part (it could have
> many further permutations depending precisely what you need..)
> 
> 
> _______________________________________________
> % NYC*BUG talk mailing list
> http://lists.nycbug.org/mailman/listinfo/talk
> %Be sure to check out our Jobs and NYCBUG-announce lists
> %We meet the first Wednesday of the month
>




More information about the talk mailing list