Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-04-2009, 11:53 PM   #1
LQ Newbie
Registered: Oct 2009
Posts: 3

Rep: Reputation: 0
Angry how do I replace.... text quesiton

how do I replace all occurences of





thank you
Old 10-05-2009, 12:11 AM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
This looks like it might be homework---please tell us a bit more about the context.

Have you looked at SED? Here's the most often recommended tutorial: (Look at the "s" command)
Old 10-05-2009, 12:14 AM   #3
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Originally Posted by magicstyle View Post
how do I replace all occurences of





thank you
Since this is almost certainly homework, I will say that you need to insert a linefeed between the two characters, and you can do it with a very simple Bash script.
Old 10-06-2009, 02:55 AM   #4
LQ Newbie
Registered: Sep 2009
Location: Sheffield, UK
Distribution: Debian
Posts: 5

Rep: Reputation: 0
A cheat is to use rpl (not installed on a lot of linux distributions by default) but you still have to insert a linefeed between the characters.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
using sed to replace text on one line in a text file vo1pwf Linux - Newbie 5 06-24-2009 07:54 AM
bash script to create text in a file or replace value of text if already exists knightto Linux - Newbie 5 09-10-2008 11:13 PM
how to replace text from to ? graziano1968 Linux - General 2 08-02-2006 06:14 AM
Replace text of unknown content with other text in file brian0918 Programming 15 07-14-2005 09:22 PM
Replace text of unknown content with other text in file brian0918 Linux - Software 1 07-14-2005 03:22 PM

All times are GMT -5. The time now is 10:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration