1 2 3 4 5 6 7
#!/bin/sh cd $1 for i in $( ls -1 $1 |grep -v ".template"); do sed -e '/^$/d' -e '/^#$/d' -e '/^#[^!]/d' -e '/^[ *]$/d' -e 's/\t/ /g' -i $i done