#!/bin/bash for fl in *.html; do mv $fl $fl.old sed '$a\' $fl.old > $fl rm -f $fl.old done