![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Print a portion of file | vanand420 | UNIX for Dummies Questions & Answers | 8 | 10-19-2008 01:00 AM |
| Print a portion of a line | vanand420 | Shell Programming and Scripting | 2 | 10-10-2008 02:23 PM |
| awk program to select a portion of a line | anju | Shell Programming and Scripting | 3 | 01-11-2008 06:33 AM |
| erasing portion of line with sed (only once) | gammaman | UNIX for Dummies Questions & Answers | 1 | 07-14-2005 08:40 PM |
| erasing portion of line with sed | gammaman | UNIX for Dummies Questions & Answers | 5 | 07-10-2005 10:47 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Print portion line in SED
Hi,
This is more a theoretical question, because I usually solved that with perl or even java, but I would like to know if it exists an easy way to do it with SED. Using regular expresions it's very easy to select an portion line. Does it exist an easy way for printing those portions in SED? For example, let's suppose that in an HTML file I want to print all links. Selecting the links it's very easy. Just for keeping the things simple, let's suppose the HTML is a well formed one href=['"]\([^'"]*\)['"] so \1 holds the link. Now my question, does it exist an easy way in sed for printing all the links? So, if I have XXXX href='link1' ZZZ href='link2' XXXX I want to have link1 link2 The only way that I know for doing that in sed is deleting everything except the links, but I'm sure it must exist an easier way to do it. Thanks a lot Isi |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|