X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B5D5B3858408
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
 header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
 spf=none smtp.mailfrom=systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=SdyUytdu c=1 sm=1 tr=0 ts=6151610f
 a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
 a=IkcTkHD0fZMA:10 a=94nOnFI1EgyDtX4ev68A:9 a=QEXdDO2ut3YA:10
To: cygwin@cygwin.com
References: <announce.20210923063710.32452-1-mark@maxrnd.com>
 <20210925133125.8f894de4e596a71e7f24961f@nifty.ne.jp>
 <78b28c3f-4604-2805-0b87-a47e0b6437ac@maxrnd.com>
 <CAJ1FpuPuqtpkOpeKSqsG7MUqh+GKK4=Qv57=8TYSRJ2tk9v6dQ@mail.gmail.com>
 <CAKwdsS8S867CcGtO6wSnP8_bPJNYgZZyR6YjFWbrrcNzSySvHQ@mail.gmail.com>
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
Organization: Systematic Software
Subject: Re: [ANNOUNCEMENT] Updated: cygutils 1.4.16-7
Message-ID: <35fa5118-005a-fde6-9668-11129be8532c@SystematicSw.ab.ca>
Date: Mon, 27 Sep 2021 00:13:34 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.14.0
MIME-Version: 1.0
In-Reply-To: <CAKwdsS8S867CcGtO6wSnP8_bPJNYgZZyR6YjFWbrrcNzSySvHQ@mail.gmail.com>
Content-Language: en-CA
X-CMAE-Envelope: MS4xfLpPZgB25Ca/xemvrAoOpXFuK2p1zmth9XkWcFV7h3tCIZmg+ETTS529QRaN6msGpXSJOzf9SX1/vyZckce3Dvz0gAWWEoq9whJE3n81VobApfg/VbuO
 3zf/Jio1zpPbyEMQaVPYAFzCmVnlI00dyRMy5ic0LO3ntEFJQiYSUMsYj9D0lAwKcHx6pank99ABlNQVFVbSTo6TMU3I/Z2vIJ8=
X-Spam-Status: No, score=-1166.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, NICE_REPLY_A,
 RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,
 RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE,
 TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Reply-To: cygwin@cygwin.com
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On 2021-09-26 18:46, Westcoast Human via Cygwin wrote:
> I'm just going to jump in here and report what I think is an issue I
> am having with 'putclip.'
> 
> For years I've been using a Windows shortcut to execute a simple
> filter function. It has recently stopped working. This is the 'target'
> entry for the shortcut:
> C:\Windows\System32\cmd.exe /c "c:\cygwin64\bin\getclip.exe |
> c:\cygwin64\bin\tr.exe -s '\012\015' ' ' |
> c:\cygwin64\bin\putclip.exe"
> 
> This now wedges and is not interruptible with Ctrl-C, but closing the
> CMD window kills everything. Task Manager shows that putclip is
> apparently stuck in a loop waiting for something to happen as the
> counts in "I/O Other" and "I/O Other bytes" keep increasing at a
> regular rate (should a timeout error be incorporated, perhaps?)

Try:

c:\cygwin64\bin\dash -c '/bin/getclip | /bin/tr -s "\r\n" " " | 
/bin/putclip'

e.g.

$ mkshortcut -D -n clip-strip /bin/dash -a "-c '/bin/getclip | /bin/tr 
-s \"\r\n\" \" \" | /bin/putclip'"

works and doesn't hang with latest Cygwin.

Note: tr has accepted C escapes for decades (Turbo C days), and use of 
"\012\015" == "\n\r" is anachronistic, rarely encountered compared to 
older systems' and network protocols' text line ending "\r\n", where 
both may be repeated, or only the "\n" for skipping lines.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
