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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18827 in the body.
You can then email your comments to 18827 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#18827; Package coreutils. (Sat, 25 Oct 2014 14:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to George Shuklin <george.shuklin <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 25 Oct 2014 14:54:02 GMT) Full text and rfc822 format available.

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

From: George Shuklin <george.shuklin <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: [Feature request] no CR for yes
Date: Sat, 25 Oct 2014 17:53:15 +0300
[Message part 1 (text/plain, inline)]
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.

Thanks.
[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#18827; Package coreutils. (Sat, 25 Oct 2014 18:01:01 GMT) Full text and rfc822 format available.

Message #8 received at 18827 <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: Sat, 25 Oct 2014 18:59:59 +0100
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'






Information forwarded to bug-coreutils <at> gnu.org:
bug#18827; Package coreutils. (Tue, 28 Oct 2014 05:35:02 GMT) Full text and rfc822 format available.

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

From: Bob Proulx <bob <at> proulx.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: Mon, 27 Oct 2014 23:34:20 -0600
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.

The 'yes' command is really just a  convenience.  If you want special
things such as no newline then use printf.  It is standard and a good
tool for custom formatted strings.

  while true; do printf foo; done

Bob




Information forwarded to bug-coreutils <at> gnu.org:
bug#18827; Package coreutils. (Fri, 21 Nov 2014 12:21:02 GMT) Full text and rfc822 format available.

Message #14 received at 18827 <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.




Added tag(s) wontfix. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Fri, 21 Nov 2014 12:21:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 18827 <at> debbugs.gnu.org and George Shuklin <george.shuklin <at> gmail.com> Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Fri, 21 Nov 2014 12:21:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 19 Dec 2014 12:24:03 GMT) Full text and rfc822 format available.

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.