On 2/22/07, Simon Geard <[EMAIL PROTECTED]> wrote: > On Wed, 2007-02-21 at 07:57 -0800, Dan Nicholson wrote: > > On 2/21/07, Ag. Hatzimanikas <[EMAIL PROTECTED]> wrote: > > > > > > This simple loop should do the job,checked in bash/zsh. > > > =========================================== > > > for filename in $(find . -type f);do > > > if [[ -n $(file $filename |grep CRLF) ]] > > > > Slightly more slimmed down: > > > > if grep -q '^M$' $filename; then > > ... > > > > I quickly tested that, but I'm pretty sure it works. You have to play > > the same tricks with ^M as Ag mentioned before. > > Shorter, but dangerous. Ag is using 'file' to confirm that the file is > actually a DOS-format text file - your version will act on any file > containing the ^M character, including binaries.
Yikes. I hadn't thought about that. That is very sound advice. Thanks, Simon. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
