Advertisement
Guest User

Untitled

a guest
Sep 5th, 2015
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. if [ $# -gt 0 ]; then
  4. (echo "$ "$@ && exec $@) | tee /dev/fd/2 | pbcopy
  5. else
  6. tee /dev/fd/2 | perl -pe 'chomp if eof' | pbcopy
  7. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement