You can output command execution results to both standard output and files by doing the following, but can you copy command execution results to the clipboard while outputting them to standard output?
command | tee output.txt
Thank you for your cooperation.
bash
If it's bash,
$echo-e'hello\nworld'|tee>(xclip-selection clipboard)
hello
world
© 2024 OneMinuteCode. All rights reserved.