#!/usr/bin/sed -nf #< strip HTML tags from input : loop /<.*>/ { #if we have a HTML tag, remove it s/<[^<>]*>//g #branch if a successful substitution was made t loop } /