GNU bug report logs - #18827
[Feature request] no CR for yes

Previous Next

Package: coreutils;

Reported by: George Shuklin <george.shuklin <at> gmail.com>

Date: Sat, 25 Oct 2014 14:54:01 UTC

Severity: wishlist

Tags: wontfix

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


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

From: Pádraig Brady <P <at> draigBrady.com>
To: George Shuklin <george.shuklin <at> gmail.com>
Cc: 18827 <at> debbugs.gnu.org
Subject: Re: bug#18827: [Feature request] no CR for yes
Date: Fri, 21 Nov 2014 12:20:42 +0000
tag 18827 wontfix
close 18827
stop

On 25/10/14 18:59, Pádraig Brady wrote:
> On 10/25/2014 03:53 PM, George Shuklin wrote:
>> Yes is very nice to generate large repeating patterns, but it always adds
>> \n at the end. It's OK for the string data but sometimes mess with binary.
>>
>> Any way to disable it will be really appreciated. F.e. -n key (like for
>> 'echo'), or any other.
> 
> Does this suffice?
> 
>   yes whatever | tr -d '\n'

Closing this now since existing tools can do it quite efficiently.
Some more examples:

text lines clocking patterns: (pass to tr -d '\n' to remove new lines)

  101010...   yes 1$'\n'0
  111111...   yes 1
  111000...   yes 1$'\n'0 | sed 'p;p'
  123456...   seq inf


binary pattern generation:

  010101...   tr '\0' 'U' < /dev/zero


cheers,
Pádraig.




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

Previous Next


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