public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated: cygutils 1.4.16-7
Date: Mon, 27 Sep 2021 00:13:34 -0600	[thread overview]
Message-ID: <35fa5118-005a-fde6-9668-11129be8532c@SystematicSw.ab.ca> (raw)
In-Reply-To: <CAKwdsS8S867CcGtO6wSnP8_bPJNYgZZyR6YjFWbrrcNzSySvHQ@mail.gmail.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.]

  reply	other threads:[~2021-09-27  6:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23  6:37 Mark Geisert
2021-09-25  4:31 ` Takashi Yano
2021-09-25  7:23   ` Takashi Yano
2021-09-25  8:12     ` Takashi Yano
2021-09-26  9:44       ` Mark Geisert
2021-09-26  9:43     ` Mark Geisert
2021-09-26  9:40   ` Mark Geisert
2021-09-26 18:41     ` Doug Henderson
2021-09-27  0:46       ` Westcoast Human
2021-09-27  6:13         ` Brian Inglis [this message]
2021-09-27  6:29           ` Brian Inglis
2021-09-27 20:00           ` Richard Beels
2021-09-27 20:00           ` Richard Beels
2021-09-27 20:00           ` Richard Beels
2021-09-27 10:10         ` Takashi Yano
2021-09-27 11:07           ` Takashi Yano
2021-09-28  3:58             ` Westcoast Human

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35fa5118-005a-fde6-9668-11129be8532c@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).