#!/bin/sh # A script that replaces either * or + with a newline character for iFile in `ls *.dip` do newFile=`basename $iFile .done.lts.phrs.cmplx.dip` cat $iFile | tr -s '\*' '\012' | tr -s '\+' '\012' | tr -s '\%' '\012' > $newFile done