#!/bin/sh # Remove all lines in source file containing #rm# overwriting original file cat $1 | sed -e '/#rm#/d' > /tmp/$$ mv -f /tmp/$$ $1