Copy standard input to the system clipboard.

Synopsis

pbcopy

Description

Reads standard input and writes it to the clipboard via the browser's Clipboard API.

Examples

$ echo hello | pbcopy

Copy the text 'hello' to the clipboard.

Notes

Requires clipboard-write permission in the browser. xclip and xsel are equivalent, X11-named aliases.

See Also

pbpaste, xclip, xsel