#!/mbari/local/bin/bash for file in `ls 200311[12345]*` do sed -e "s/ppm Sensor output (ppm) /mV Sensor output (mV) /g" $file | sed -e "s/mv Sensor output (mV) /ppm Sensor output (ppm) /g" > foo.out cp foo.out $file done