bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18827: [Feature request] no CR for yes


From: Pádraig Brady
Subject: bug#18827: [Feature request] no CR for yes
Date: Fri, 21 Nov 2014 12:20:42 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]