Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 656 Bytes

send-output-to-clipboard-using-xclip.md

File metadata and controls

30 lines (26 loc) · 656 Bytes
aliases category classification date date_modified draft id image links local_archive_links pinned print series tags title type
send-output-to-clipboard-using-xclip
cli
public
2022-02-04 03:54:27 -0800
2023-11-19 03:39:22 -0800
false
20220204115427
false
false
xclip
xsel
clipboard
stdout
stdin
copy
paste
Send Output to Clipboard using xclip
tech-note

To send the output of a command in the terminal to the clipboard, the below is super helpful.

# Send contents of file to clipboard:
xclip -selection clip /tmp/owm.json

# Send pipe to clipboard:
rg --files-with-matches "^tags: \[\]" *.md | xclip -selection clip