From 3169d948c049664bcf7216d4c4ae751881099d3e Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 23 Apr 2018 14:09:48 -0700 Subject: Don't include spurious '\r's in `top -b` output. --- toys/posix/ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys') diff --git a/toys/posix/ps.c b/toys/posix/ps.c index b8542e60..c5c0f790 100644 --- a/toys/posix/ps.c +++ b/toys/posix/ps.c @@ -1359,9 +1359,9 @@ static int header_line(int line, int rev) if (toys.optflags&FLAG_b) rev = 0; - printf("%s%*.*s%s\r\n", rev ? "\033[7m" : "", + printf("%s%*.*s%s\n", rev ? "\033[7m" : "", (toys.optflags&FLAG_b) ? 0 : -TT.width, TT.width, toybuf, - rev ? "\033[0m" : ""); + rev ? "\033[0m\r" : ""); return line-1; } -- cgit v1.2.3