sed work with HTML

April 29, 2009 at 00:12:32
Specs: Linux x86_64
How could I replace text from </p><p> to <p> not in all occurencies but only on certain lines?
e.g. do it on lines, which numbers are 528, 559, 598, 637, 664 etc.

See More: sed work with HTML

Report •


#1
April 29, 2009 at 08:18:16
Sed substitution on specific lines is easily illustrated in the following example for a file numbered 1 -> 10.

#sed -e '2s/2/two/' -e '4s/4/four/' -e '6s/6/six/' file
1
two
3
four
5
six
7
8
9
10


Report •

#2
April 29, 2009 at 18:56:39
doesn't work if your pattern you want to get spans multiple lines. show some sample input...

Unix Win32 tools | Gawk for Windows


Report •

Related Solutions


Ask Question