dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

pastebin (436B)


      1 #!/bin/sh
      2 # no command line arguments - assume read from stdin
      3 if [ -z "$1" ] || [ "$1" = - ] ; then
      4 	curl -F 'f:1=<-' ix.io
      5 #file name argument: post to 0x0
      6 elif [ -e "$1" ] ; then
      7 	curl -F"file=@\"$1\"" https://0x0.st
      8 else
      9 cat << EOF
     10 usage: head -n 20 foo.txt | $0
     11        $0 < foo.txt
     12 text input from stdin will be pasted to http://ix.io
     13 
     14 usage: $0 filename
     15 posts filename to https://0x0.st
     16 this can be binary and up to 512MB.
     17 EOF
     18 fi