osx - How to copy input from from the clipboard using pbcopy and setting that to another file that can then be called by pbpaste -


i want data main clipboard onto own file when user executes command can retrieve information set upon second file. alternatively pbcopy direcly second file , run command pbpaste. smarter me tell me how this. have searched hours now.

pbpaste reads clipboard/pasteboard , writes stdout (as if pasting), can copy pasteboard file using pbpaste > filename. can whatever want file. pbcopy puts onto pasteboard, if want put file's contents pasteboard can pbcopy < filename.

the < , > operators shell redirection operators, can learn more in command-line or unix tutorial.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -