LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how do I replace.... text quesiton (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-replace-text-quesiton-759739/)

magicstyle 10-04-2009 11:53 PM

how do I replace.... text quesiton
 
how do I replace all occurences of

><

with

>
<

?


thank you

pixellany 10-05-2009 12:11 AM

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:
http://www.grymoire.com/Unix/Sed.html (Look at the "s" command)

lutusp 10-05-2009 12:14 AM

Quote:

Originally Posted by magicstyle (Post 3707919)
how do I replace all occurences of

><

with

>
<

?


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.

nilocj.d 10-06-2009 02:55 AM

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.


All times are GMT -5. The time now is 06:57 PM.