bash: get content between a pair of HTML tags -


i need html contents between pair of given tags using bash script. example, having html code below:

<html> <head> </head> <body>  text   <div>   text2     <div>         text3     </div>   </div> </body> </html> 

using bash command/script, given body tag, get:

 text   <div>   text2     <div>     text3     </div>   </div> 

thanks in advance.

plain text processing not html/xml parsing. hope give idea:

kent$  xmllint --xpath "//body" f.html  <body>  text   <div>   text2     <div>         text3     </div>   </div> </body> 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -