Cygwin: Is it safe to pipe from /dev/clipboard to clip?

1

I am using cygwin on windows.

Given a long list of strings in the clipboard:

mail
know
trial
posture
wind
census
shelf
concrete
moon
fee

If I want to "unwrap" them, is it safe to use such a command:

cat /dev/clipboard | tr -d "\n" | tr "\r" "," | clip

In my example, this produces the result mail,know,trial,posture,wind,census,shelf,concrete,moon,fee as intended, but is it safe? I have the fear that maybe if I am unlucky, the last element of the pipe (clip) can "spoil" the first one.

Bowi

Posted 2020-02-03T15:10:31.187

Reputation: 995

No answers