Date: Thu, 19 Jul 2001 21:28:37 -0500 From: Mike Meyer <mwm@mired.org> To: Mikhail Teterin <mi@aldan.algebra.com> Cc: questions@freebsd.org Subject: Re: grep and \t (\r, etc.) Message-ID: <15191.38741.225843.854067@guru.mired.org> In-Reply-To: <78719817@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Mikhail Teterin <mi@aldan.algebra.com> types: > Hi! > > I'm trying to clean up the HTML pages from the MSDOS-style > EOL characters. Actually removing them is easy: > > tr -d \\r < in > out > > does wonders, and, even better (removes spaces at EOL too): > > perl -pi -e 's/[\r ]+$//g' <file list> > > seems to work, but to find them (I don't want to touch the "good" > pages). I can not think of anything but grep. Which I can not make > work :( For example: > > find . -type -name '*.htm*' | xargs grep -E '\r$' > > just keeps listing all lines which end with ``r''... Any clues? Instead of trying to do this with home-grown tools, try installing tidy from the ports and just running it over all your html files. That will clean those up, among other things. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15191.38741.225843.854067>