#!/bin/bash cd ~/.cscmail for i in `find ~/.cscmail -name *.msg;` do sed 's/^Content-Type: text$/Content-Type: text\/plain/i' $i > temp.txt; mv temp.txt $i; done