Computing.Net > Forums > Unix > replace a string to new Line

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

replace a string to new Line

Reply to Message Icon

Name: bibhuti
Date: April 4, 2005 at 08:18:57 Pacific
OS: LINUX
CPU/Ram: pIV
Comment:

The following expression is in one line

"AN- EIP04398375704| TI- Convergence and dissemination: A brief history and description of the StreamNet Project| AU- Oftedahl, Lenora A.|"

I want replace "TI-" to a new line with "TI: " like
AN- EIP04398375704|
TI- Convergence and dissemination: A brief history and description of the StreamNet Project|
AU- Oftedahl, Lenora A.|
What command to be used in VI,Sed, tr etc to change in above said format.

Please help me

Bibhuti BHusan Sahoo



Sponsored Link
Ads by Google

Response Number 1
Name: cdac1000
Date: April 8, 2005 at 06:26:12 Pacific
Reply:

if you can open the file in vi use following

:%s/ TI/^MTI

Note to get ^M use following

Hold down the Ctrl, and press v m

DO NOT USE Shift+6 and Shift+M



0

Response Number 2
Name: bibhuti
Date: April 10, 2005 at 22:34:22 Pacific
Reply:

Thank you @cdac very much for your suggestion


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: replace a string to new Line

vi : insert a string every 2nd line www.computing.net/answers/unix/vi-insert-a-string-every-2nd-line/8251.html

Replace a string in Script www.computing.net/answers/unix/replace-a-string-in-script/7047.html

replace pattern with new line www.computing.net/answers/unix/replace-pattern-with-new-line/7944.html