Skip to main content

Copy command line output to the clipboard on Mac and Windows

Published: 2018-10-12 • Lastmod: 2019-09-12

In each example below, the contents of a file are copied to the clipboard.

Mac #

cat <file> | pbcopy

Windows #

type <file> | clip

Next: Quotes on endurance
Previous: Script to add a page-level variable to content front matter in Hugo