diff --git a/src/cat.c b/src/cat.c index 68f3c9ac5..c9838cfc5 100644 --- a/src/cat.c +++ b/src/cat.c @@ -486,7 +486,15 @@ cat ( *bpout++ = ch + 64; } else if (ch != '\n') - *bpout++ = ch; + { + if (ch == '\r' && (*bpin == '\n') && show_ends) + { + *bpout++ = '^'; + *bpout++ = ch + 64; + } + else + *bpout++ = ch; + } else { newlines = -1;