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


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: John Kendall <john <at> capps.com>, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Bob Proulx <bob <at> proulx.com>, "19240 <at> debbugs.gnu.org" <19240 <at> debbugs.gnu.org>
Subject: bug#19240: cut 8.22 adds newline
Date: Thu, 04 Dec 2014 15:01:23 -0700
[Message part 1 (text/plain, inline)]
On 12/04/2014 02:56 PM, Eric Blake wrote:
> So does sed, although no longer a short one-liner:
> 
> echo "$FILE" | sed -e 's/^\(.\{30\}\).*/\1/' \
>                    -e '$ {' \
>                    -e   's/$/ ============================/' \
>                    -e   's/^\(.\{30\}\).*/\1/' \
>                    -e   '$ s/$/ matches ==========/' \
>                    -e '}'

Or:

 echo "$FILE ============================" | \
  sed -e 's/^\(.\{30\}\).*/\1/' \
      -e '$ s/$/ matches ==========/'

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

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.