![]() |
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 |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove html tags with bash | dejavu88 | Shell Programming and Scripting | 4 | 05-22-2008 01:58 PM |
| How to supplement HTML tags with SED | DocBrewer | Shell Programming and Scripting | 3 | 04-25-2008 09:40 AM |
| html tags | dunryc | Shell Programming and Scripting | 3 | 11-29-2007 06:14 PM |
| How to split file by tags inside file? | spookyrtd99 | Shell Programming and Scripting | 1 | 07-31-2006 12:50 AM |
| Automated replacement of HTML Tags | nem_kirk | SUN Solaris | 1 | 11-17-2005 01:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
How to remove only html tags inside a file?
Hi All,
I have following example file i want to remove all html tags only, Input File: <html> <head> <title>Software Solutions Inc., </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor=white leftmargin="0" topmargin="0" marginwidth="00" marginheight="0" class=NormalFont> <table ID="Table2" Bordercolor=black border=2 cellspacing=2 cellpadding=2> <TR><TD colspan=4 align=left bgcolor="yellow"><font color=blue ><b> Iswar Ramamoorthy</b></font></TD> </TR> <tr> <td align=center><b>Date</b></td> <td align=center><b>Total Hours</b></td> <td align=center><b>Total IN Time</b></td> <td align=center><b>Total Break Hours</b></td> </tr> </table> <table ID="Table2" Bordercolor=black border=2 cellspacing=2 cellpadding=2> <TR><TD colspan=4 align=left bgcolor="yellow"><font color=blue ><b>Aman Jain</b></font></TD> </TR> <tr> <td align=center><b>Date</b></td> <td align=center><b>Total Hours</b></td> <td align=center><b>Total IN Time</b></td> <td align=center><b>Total Break Hours</b></td> </tr> </table> <table ID="Table2" Bordercolor=black border=2 cellspacing=2 cellpadding=2> <TR><TD colspan=4 align=left bgcolor="yellow"><font color=blue ><b>Anilkumar Kaandukuri</b></font></TD> </TR> <tr> <td align=center><b>Date</b></td> <td align=center><b>Total Hours</b></td> <td align=center><b>Total IN Time</b></td> <td align=center><b>Total Break Hours</b></td> </tr> <tr class=normalfont > <td align=center>11/16/2007</td> <td align=center>1:16:0</td> <td align=center>01:16</td> <td align=center>0</td> </tr> </table> <table ID="Table2" Bordercolor=black border=2 cellspacing=2 cellpadding=2> <TR><TD colspan=4 align=left bgcolor="yellow"><font color=blue ><b>Arun Sivaraman</b></font></TD> </TR> <tr> <td align=center><b>Date</b></td> <td align=center><b>Total Hours</b></td> <td align=center><b>Total IN Time</b></td> <td align=center><b>Total Break Hours</b></td> </tr> My expected result: Software Solutions Inc Iswar Ramamoorthy Date Total Hours Total IN Time Total Break Hours Aman Jain Date Total Hours Total IN Time Total Break Hours Anilkumar Kaandukuri Date Total Hours Total IN Time Total Break Hours 11/16/2007 1:16:0 01:16 0 ............ ........... etc............ |
|
||||
|
All the commands are doing good,
sed -n '/^$/!{s/<[^>]*>//g;p;}' filename Please explain the above sed command Thanks, Thangaraju. Last edited by btech_raju; 11-23-2007 at 12:39 PM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|