Computing.Net > Forums > Programming > sed work with HTML

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.

sed work with HTML

Reply to Message Icon

Name: punktyras
Date: April 29, 2009 at 00:12:32 Pacific
OS: Linux x86_64
Subcategory: Batch
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: user57
Date: April 29, 2009 at 08:18:16 Pacific
Reply:

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


0

Response Number 2
Name: ghostdog
Date: April 29, 2009 at 18:56:39 Pacific
Reply:

doesn't work if your pattern you want to get spans multiple lines. show some sample input...

Unix Win32 tools | Gawk for Windows


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Vb 6.0 Batch script check.



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: sed work with HTML

Problem with html www.computing.net/answers/programming/problem-with-html/1131.html

working with large numbers in RSA www.computing.net/answers/programming/working-with-large-numbers-in-rsa/7212.html

Perl with HTML forms? www.computing.net/answers/programming/perl-with-html-forms/13513.html