3 ms·
NB, no, you don't have to use stdin/stdout, but rather you have the option to use those. What pbcopy/pbpaste, xclip, and the Termux commands offer is an altern
by dredmorbius 4y ago
NB, no, you don't have to use stdin/stdout, but rather you have the option to use those.
What pbcopy/pbpaste, xclip, and the Termux commands offer is an alternative to pasting via mouse actions.
You can still interact with mouse-based controls. I'll typically do that, for example, when case-normalising titles using a shell utility I'd created.
Since 'xc' will overwrite the clipboard if invoked in the same pipeline, this command fails to deliver expected results:
xp | titlecase | xc
Instead, I can paste in some ALL CAPS TITLE, say:
echo 'ALL CAPS TITLE' | titlecase | xc # Where 'ALL CAPS TITLE' has been pasted via mouse
Running 'xp' alone, we see the result:
$ xp
All Caps Title
So, again, you seem not to understand either the problem space or the available tools.