]> Pileus Git - vpaste/blob - vpaste
Adding ls and head
[vpaste] / vpaste
1 #!/bin/bash
2
3 # Copyright (C) 2009 Andy Spencer - Public domain
4
5 uri="http://vpaste.net/"
6 if [ -f "$1" ]; then
7         out=$(curl -s -F "x=<$1" "$uri?$2")
8 else
9         out=$(curl -s -F 'x=<-' "$uri?$1")
10 fi
11 echo "$out"
12 if [ -x "`which xclip 2>/dev/null`" -a "$DISPLAY" ]; then
13         echo -n "$out" | xclip -i -selection primary
14         echo -n "$out" | xclip -i -selection clipboard
15 fi