From cd6a63d014235502ea1e06c1bb351a46b3ee3632 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sun, 20 Dec 2015 14:55:46 -0600 Subject: [PATCH] Add Copying File Contents To System Paste Buffer as a unix til. --- README.md | 1 + unix/copying-file-contents-to-system-paste-buffer.md | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 unix/copying-file-contents-to-system-paste-buffer.md diff --git a/README.md b/README.md index 044b492..22934e1 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,7 @@ smart people at [Hashrocket](http://hashrocket.com/). - [Change Default Shell For A User](unix/change-default-shell-for-a-user.md) - [Check If A Port Is In Use](unix/check-if-a-port-is-in-use.md) - [Clear The Screen](unix/clear-the-screen.md) +- [Copying File Contents To System Paste Buffer](unix/copying-file-contents-to-system-paste-buffer.md) - [Create A File Descriptor with Process Substitution](unix/create-a-file-descriptor-with-process-substitution.md) - [Do Not Overwrite Existing Files](unix/do-not-overwrite-existing-files.md) - [File Type Info With File](unix/file-type-info-with-file.md) diff --git a/unix/copying-file-contents-to-system-paste-buffer.md b/unix/copying-file-contents-to-system-paste-buffer.md new file mode 100644 index 0000000..1d83b2c --- /dev/null +++ b/unix/copying-file-contents-to-system-paste-buffer.md @@ -0,0 +1,10 @@ +# Copying File Contents To System Paste Buffer + +If you need to copy and paste the contents of a file, the `pbcopy` command +can be one of the best ways to accomplish this. Simply `cat` the file and +pipe that into `pbcopy` to get the contents of the file into the system +paste buffer. + +``` +$ cat some-file.txt | pbcopy +```