remove html tags from a file

Contributor Icon Contributed by Michilimackinac Date Icon January 13, 2004  
Tag Icon Tagged: UNIX

This a useful one-liner using sed to remove all the html tags from a file


sed -e ’s/<[^>]*>//g’ foo.html

Previous recipe | Next recipe |
 
  • Anonymous
    looks like this command removes all tags enclosed in open paren closed paren
  • Anonymous
    thanks a lot, you save my day ^_^
  • Christoffer
    Thank You.. You also saved my day.
  • Anonymous
    Awesome! Thanks heaps for sharing
  • Tex
    Thanks a lot!!!!!!!!!!!!!!
blog comments powered by Disqus