Can't use special characters \n or \r
Dave Korn
dave.korn@artimi.com
Wed Jul 30 13:48:00 GMT 2008
Mark J. Reed wrote on 30 July 2008 14:25:
> On Wed, Jul 30, 2008 at 5:28 AM, Dave Korn wrote:
>> Normal grep and sed don't speak C-style escape chars.
>
> Actually, sed does:
You omitted a vital qualifier from my earlier post ...
>> it all gets tangled up in the matching against end-of-line $ anchor
... without which you are not accurately representing what I was saying
there.
> $ sed -e 's/\r//' foo.txt | od -c
> 0000000 T h i s i s a t e s t . \n
> 0000020
Yes, very good. Now try it with \n.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list