#!/bin/sh # Remove_HTML_Tags.sh # Sat Oct 10 00:22:26 PDT 2009 # Chieh Cheng # http://www.CynosureX.com/ # GNU General Public License (GPL) Version 2, June 1991 scriptName=`basename "$0"` removeTags () { string="$1" echo "${string}" | sed 's/<[^>]*>//g' } usage () { echo " Usage: ${scriptName} \"string\"" echo echo " Use a '-' in place of the string to read" echo " from standard input (pipe)." } if [ $# -eq 1 ] then string="$1" if [ "${string}" = "-" ] then while read string do removeTags "${string}" done else removeTags "${string}" fi else usage fi