Mercurial > repo
annotate bin/paste @ 5326:251f5b3167b6
<izabera> ` echo harry ron hermione >> bin/emptylist
author | HackBot |
---|---|
date | Thu, 23 Apr 2015 06:53:55 +0000 |
parents | 1bc67ded06c4 |
children |
rev | line source |
---|---|
0 | 1 #!/bin/bash |
4598 | 2 if [ "$1" ] && url "$1" 2>/dev/null # Save making a file when it already exists. |
0 | 3 then |
4598 | 4 true |
5 else | |
4531 | 6 PASTENUM="$RANDOM" |
7 | |
8 mkdir -p $HACKENV/paste | |
9 | |
10 url paste/paste."$PASTENUM" | |
4598 | 11 cat -- "${1--}" > $HACKENV/paste/paste."$PASTENUM" |
0 | 12 fi |