Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with search and replace script

Status
Not open for further replies.

Sopapa

ISP
Jan 3, 2003
3
AR
I have a lot of txt, and i need to translate some characters, ( this is a copy & past of a vi edit).
-------------------------
INTERNET - CONOCIMIENTO^V
^V
THE NEW YORK TIMES ENCONTRO FORMA DE APROPIARSE^V
GRATIS DEL CONOCIMIENTO DE LOS INTERNAUTAS^V
^V
La tendencia de muchos internautas por comunicarse entre s¡ atrav~Bs de la red y la lógica de que ~Bstos tienen temas e intereses encom£n, dieron forma a la idea de Abuzz, cuyo mecanismo se basa en quecualquier persona inscripta pueda formular una pregunta, la que le llegar
-----------------------------------
when i use a perl script like
perl -pi -e 's/¡/í/g' *.TXT works fine with the "í", but i cant see the ^V (its an enter) and the ^B (it am "é") with the perl script.
Sorry for mi english
And thanks
 
Hi Sopapa

Try asking your question in the Perl forum here at Tek-Tips forum219 Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Hi,

I know that when I need to type in a ^J or ^M under Solaris, I can use typing in e.g. ^V^J (Control-V Control-J). Perhaps your vi shows it somewhat like that (never heard of ^V being an enter).

You might want to type if like that ^V^M (may be difficult) or ^V^J. For what you're trying to do, the 'sed' command would work also.

HTH
Pieter
 
i do it, with a litlle tip or trick (sorry for my english)
i edit the file with vi and delete all the words, but not the ^V and put the sentence into that file.

 
I not sure if you or getting this form a word processor or what and bringing it up in unix. If thats the case try this:

at the prompt type, dos2unix yourfilename > newfilename

this remove any carriage returns or such.

Peace!

hombase
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top