Created
October 11, 2011 09:01
-
-
Save geta6/1277621 to your computer and use it in GitHub Desktop.
Clip StdOut function for MacOSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# コマンドを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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pbcopy < hogeでできることに気付かされた