From unknown Fri Sep 05 15:36:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18827: [Feature request] no CR for yes Resent-From: George Shuklin Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 25 Oct 2014 14:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18827 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 18827@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14142488107785 (code B ref -1); Sat, 25 Oct 2014 14:54:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Oct 2014 14:53:30 +0000 Received: from localhost ([127.0.0.1]:35379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi2if-00021U-Pw for submit@debbugs.gnu.org; Sat, 25 Oct 2014 10:53:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49122) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi2ic-00021C-66 for submit@debbugs.gnu.org; Sat, 25 Oct 2014 10:53:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi2iW-0006Ij-5v for submit@debbugs.gnu.org; Sat, 25 Oct 2014 10:53:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52011) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi2iW-0006If-30 for submit@debbugs.gnu.org; Sat, 25 Oct 2014 10:53:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi2iV-00086h-5H for bug-coreutils@gnu.org; Sat, 25 Oct 2014 10:53:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xi2iU-0006IT-7a for bug-coreutils@gnu.org; Sat, 25 Oct 2014 10:53:19 -0400 Received: from mail-la0-x22d.google.com ([2a00:1450:4010:c03::22d]:47438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xi2iT-0006IN-Ve for bug-coreutils@gnu.org; Sat, 25 Oct 2014 10:53:18 -0400 Received: by mail-la0-f45.google.com with SMTP id gm9so2467645lab.4 for ; Sat, 25 Oct 2014 07:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=VpF91AtLwIdxW5YW1Vn4NeHIwHWzpKnE6Pf5ZNR4zn4=; b=TDwI7c8hG90nZKYQi8+rzozlpLmcexFUlK62YIvVHuiYavpjM+Gg/4cyFZKW+jlpln blq/3KYGWsacVU3qoCb4+SGIuO/KIkv28C8j731kzakJ9KQUvuQOqmpNUouB4qtwpG5L +T7ECESpJg0zTpjO0snk6oAAqvP1kQya/VHMhSmVjwzhUqi0FO73+d0XaYXvxP9+PB/R Q66PEtAti22DRDsn+wWGRKrQyDWam46T+mCnwxGNTZm0P8ZLHeUUYCB/J8NZ94kRiHqB M/15HD5OM0tTYsU5OJddurOIWu3SqVN6CwkWaQsvsOUD2WFI+Ov0g4mqdFhDcJktvob9 lNDg== MIME-Version: 1.0 X-Received: by 10.152.2.41 with SMTP id 9mr11101656lar.47.1414248796017; Sat, 25 Oct 2014 07:53:16 -0700 (PDT) Received: by 10.152.9.40 with HTTP; Sat, 25 Oct 2014 07:53:15 -0700 (PDT) Received: by 10.152.9.40 with HTTP; Sat, 25 Oct 2014 07:53:15 -0700 (PDT) Date: Sat, 25 Oct 2014 17:53:15 +0300 Message-ID: From: George Shuklin Content-Type: multipart/alternative; boundary=089e013c62581c59ee0506407560 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e013c62581c59ee0506407560 Content-Type: text/plain; charset=UTF-8 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. --089e013c62581c59ee0506407560 Content-Type: text/html; charset=UTF-8

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.

--089e013c62581c59ee0506407560-- From unknown Fri Sep 05 15:36:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18827: [Feature request] no CR for yes Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 25 Oct 2014 18:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18827 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: George Shuklin Cc: 18827@debbugs.gnu.org Received: via spool by 18827-submit@debbugs.gnu.org id=B18827.141426001025109 (code B ref 18827); Sat, 25 Oct 2014 18:01:01 +0000 Received: (at 18827) by debbugs.gnu.org; 25 Oct 2014 18:00:10 +0000 Received: from localhost ([127.0.0.1]:35465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi5dJ-0006Wu-RF for submit@debbugs.gnu.org; Sat, 25 Oct 2014 14:00:10 -0400 Received: from mail2.vodafone.ie ([213.233.128.44]:35208) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi5dH-0006V9-EA for 18827@debbugs.gnu.org; Sat, 25 Oct 2014 14:00:08 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUBADrkS1RtT901/2dsb2JhbAANT4dAzmyDIAKBHAGFAAEBBCNWEAsNCwICBRYLAgIJAwIBAgFFBg0BBwEBiEKzBniUVwEBAQEBAQEBAQEBAQEBAQEBAQEZgSyPXAeCd4FUAQSldpISgzYBAQE Received: from unknown (HELO [192.168.1.43]) ([109.79.221.53]) by mail2.vodafone.ie with ESMTP; 25 Oct 2014 18:59:59 +0100 Message-ID: <544BE51F.8050508@draigBrady.com> Date: Sat, 25 Oct 2014 18:59:59 +0100 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 References: In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) 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' From unknown Fri Sep 05 15:36:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18827: [Feature request] no CR for yes Resent-From: Bob Proulx Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 28 Oct 2014 05:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18827 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: George Shuklin Cc: 18827@debbugs.gnu.org Received: via spool by 18827-submit@debbugs.gnu.org id=B18827.14144744655183 (code B ref 18827); Tue, 28 Oct 2014 05:35:02 +0000 Received: (at 18827) by debbugs.gnu.org; 28 Oct 2014 05:34:25 +0000 Received: from localhost ([127.0.0.1]:37124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XizQG-0001LX-W2 for submit@debbugs.gnu.org; Tue, 28 Oct 2014 01:34:25 -0400 Received: from joseki.proulx.com ([216.17.153.58]:43179) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XizQE-0001LL-6a for 18827@debbugs.gnu.org; Tue, 28 Oct 2014 01:34:23 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id BA17F21217; Mon, 27 Oct 2014 23:34:20 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 801892DC38; Mon, 27 Oct 2014 23:34:20 -0600 (MDT) Date: Mon, 27 Oct 2014 23:34:20 -0600 From: Bob Proulx Message-ID: <20141027233224707835331@bob.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -0.6 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) 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 From unknown Fri Sep 05 15:36:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18827: [Feature request] no CR for yes Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 21 Nov 2014 12:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18827 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: George Shuklin Cc: 18827@debbugs.gnu.org Received: via spool by 18827-submit@debbugs.gnu.org id=B18827.1416572448825 (code B ref 18827); Fri, 21 Nov 2014 12:21:02 +0000 Received: (at 18827) by debbugs.gnu.org; 21 Nov 2014 12:20:48 +0000 Received: from localhost ([127.0.0.1]:40430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrnCi-0000DA-1i for submit@debbugs.gnu.org; Fri, 21 Nov 2014 07:20:48 -0500 Received: from mail2.vodafone.ie ([213.233.128.44]:19082) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XrnCe-0000Cu-7W; Fri, 21 Nov 2014 07:20:44 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlkFAE8tb1RtTZiq/2dsb2JhbABbgw6CUYETUM0HgxwCgQQWAQEBAQF9hAMBAQQjDwFGEAsNCwICBRYLAgIJAwIBAgFFBg0BBwEBiEEBuRKGC5BWAQEBBwEBAQEegS2PWweCd4FUBacLjlGDez2CewEBAQ Received: from unknown (HELO localhost.localdomain) ([109.77.152.170]) by mail2.vodafone.ie with ESMTP; 21 Nov 2014 12:20:42 +0000 Message-ID: <546F2E1A.4020302@draigBrady.com> Date: Fri, 21 Nov 2014 12:20:42 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 References: <544BE51F.8050508@draigBrady.com> In-Reply-To: <544BE51F.8050508@draigBrady.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.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.