Skip to content

Instantly share code, notes, and snippets.

@poritsky
Created January 28, 2013 23:20
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poritsky/4660217 to your computer and use it in GitHub Desktop.
Save poritsky/4660217 to your computer and use it in GitHub Desktop.
Copy contents of file. (For use with copying contents of text files)
tell application "Finder" to set filePath to quoted form of (POSIX path of (the selection as alias))
do shell script "cat " & filePath & " | pbcopy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment