Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash copy contents of file to clipboard

# Basic syntax using pbcopy:
pbcopy < /path/to/file

# Paste with:
pbpaste > /path/to/output_file

# Note, you can filter what you paste with grep, e.g.:
pbpaste | grep 'useful text' > /path/to/output_file
Source by osxdaily.com #
 
PREVIOUS NEXT
Tagged: #bash #copy #contents #file #clipboard
ADD COMMENT
Topic
Name
7+3 =