Remove HTML Tags from a File

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


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

The Conversation

Follow the reactions below and share your own thoughts.

  • Christoffer

    Thank You.. You also saved my day.

  • Anonymous

    Awesome! Thanks heaps for sharing

    • Tex

      Thanks a lot!!!!!!!!!!!!!!

  • cinas

    Great, very simple and just works ;)

  • janem

    Thanks a lot, handy little thing

  • Vlad

    Damn u just save my day, thx bro!