#!/bin/bash

for f in "$@" ; do

echo "Processing $f..."
mv "$f" "$f~"
sed \
-e 's/< *[Ss][Cc][Rr][Ii][Pp][Tt][^>]*>.*<\/ *[Ss][Cc][Rr][Ii][Pp][Tt][^>]>//g' \
-e '/ *<[Ss][Cc][Rr][Ii][Pp][Tt][^>]*>/,/<\/ *[Ss][Cc][Rr][Ii][Pp][Tt][^>]*>/d' \
< "$f~" > "$f"

done
echo "Complete."
exit

ViewGit