GNU bug report logs - #19240
cut 8.22 adds newline

Previous Next

Package: coreutils;

Reported by: John Kendall <john <at> capps.com>

Date: Mon, 1 Dec 2014 16:44:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #39 received at 19240 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: John Kendall <john <at> capps.com>, 
 "19240 <at> debbugs.gnu.org" <19240 <at> debbugs.gnu.org>
Cc: Bob Proulx <bob <at> proulx.com>
Subject: Re: bug#19240: cut 8.22 adds newline
Date: Thu, 04 Dec 2014 12:39:16 -0800
On 12/04/2014 10:41 AM, John Kendall wrote:
> echo "$FILE ===========================\c"| cut -c1-30

Since you're going to have to rewrite it anyway if you want it to be 
portable, I suggest doing it this way:

printf '%.30s' "$FILE ==========================="

as it's a lot more efficient anyway.




This bug report was last modified 10 years and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.