Copy & Paste in Terminal
Mac provides the command line for copy and paste, useful for some tasks.
refer link:http://osxdaily.com/2007/03/05/manipulating-the-clipboard-from-the-command-line/
Copy
copy the content of the file
pbcopy < file.txt
now the content is in clipboard, ready to be pasted
you can use pipe to combine command such as
find,grep,awkandcutto filter and aggregate data.
for example:
docker images | grep "iis-" | pbcopy
echo "this is a demo" | pbcopy
Paste
pbpaste
redirect content to a file
pbpaste > file.txt
pbpaste | grep "xxx"

浙公网安备 33010602011771号