#!/bin/bash #Show all files with ^M in current folder fgrep -l `echo -ne '\r'` *.sas > temp_mm.tmp allfiles=`more temp_mm.tmp` for file in ${allfiles[@]} do ls -l $file done rm temp_mm.tmp