pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

Bash pastebin - collaborative debugging tool View Help


Posted by grouse on Mon 2 Jun 16:07
report abuse | download | new post

  1. #!/usr/bin/env bash
  2.  
  3. # examples:
  4. # dropoff
  5. # ~/.pickup/* -> .
  6.  
  7. # dropoff server
  8. # server:~/.pickup/* -> .
  9.  
  10. # dropoff server target
  11. # server:~/.pickup/* -> target
  12.  
  13. # XXX: warning, will not work if $PICKUPDIR is set differently on other system
  14.  
  15. _PICKUPDIR="~/.pickup"
  16.  
  17. if [ $1 ]; then
  18.     scp -r "${1}:${_PICKUPDIR}/*" "${2:-.}"
  19. else
  20.     cp --dereference -prv "${_PICKUPDIR}/*" .
  21. fi

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post