를 통해 일부 명령 출력을 시스템 클립 보드에 넣는 방법이 있습니다 xclip
.
some-command | xclip -selection clipboard
반전 작업을 수행하고 싶습니다-시스템 클립 보드를 터미널에 인쇄하십시오. 어떻게 할 수 있습니까?
답변
맨 페이지에 따르면 데이터를 반대 방향으로 밀어 넣는 -o
옵션이 있습니다 xclip
.
-i, -in
read text into X selection from standard input or files (default)
-o, -out
prints the selection to standard out (generally for piping to a file or program)
위의 명령에서 -i
가 가정됩니다.
답변
다른 선택은 xsel
프로그램입니다.
By default, this program outputs the selection without modification if both standard input and standard output are terminals (ttys). Other‐ wise, the current selection is output if standard output is not a ter‐ minal (tty), and the selection is set from standard input if standard input is not a terminal (tty). If any input or output options are given then the program behaves only in the requested mode.
따라서 클립 보드에 무언가를 복사 xsel
하여 터미널로 인쇄 하기 만하면 됩니다. man xsel
어떤 클립 보드를 사용해야하는지 등의 고급 옵션을 읽을 수 있습니다 .