bhalash

Bash OS check

Dec 27th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.20 KB | None | 0 0
  1. if [[ $(uname) == 'Darwin' ]]; then
  2.     pbcopy < $temp
  3. else if [[ $(uname) == 'Linux' ]]; then
  4.     cat $temp | xclip -sel clip
  5. else if [[ ${$(uname):0:6} == 'CYGWIN' ]]; then
  6.     putclip < $temp
  7. fi
Advertisement
Add Comment
Please, Sign In to add comment