Skip to content

Instantly share code, notes, and snippets.

@geta6
Created October 11, 2011 09:01
Show Gist options
  • Save geta6/1277621 to your computer and use it in GitHub Desktop.
Save geta6/1277621 to your computer and use it in GitHub Desktop.
Clip StdOut function for MacOSX
# コマンドをevalしてクリップボードに送るだけ
# Ex.) clip cat ~/.ssh/id_rsa.pub
function clip() {
local str
  if [ $# != 0 ]; then
for i in $*; do
str="$str $i"
done
fi
eval $str | pbcopy
}
@geta6
Copy link
Author

geta6 commented Oct 11, 2011

pbcopy < hogeでできることに気付かされた

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment