xclip:tldr:78260
The command echo 123 | xclip -sel clip
is used to store the text "123" in the clipboard using the xclip command-line utility.
Here's a breakdown of the command:
echo 123
: This portion of the command uses the echo
command to output the text "123" to the console.
|
: The pipe symbol (|
) is a command-line operator used to redirect the standard output of one command to the input of another command. In this case, it takes the output of the echo
command and passes it as input to the xclip
command.
xclip
: This is a command-line utility that allows for interaction with the X Server clipboard. It provides commands to read from or write to the clipboard.
-sel clip
: This option specifies that the data being passed should be stored in the "clipboard" selection.
So, when this command is executed, it will take the output of echo 123
(which is "123") and pass it to xclip
, which will then store the text "123" in the clipboard, specifically in the "clipboard" selection.