view bin/paste @ 5186:11b7f091967f

<Jafet> ` echo "<Jessicatz> you play too much nethack when: you look down both sides of the corridor, start to sweat and then realize you\'re looking at your email address" >wisdom/nethack
author HackBot
date Thu, 11 Dec 2014 15:25:16 +0000
parents 1bc67ded06c4
children
line wrap: on
line source

#!/bin/bash
if [ "$1" ] && url "$1" 2>/dev/null # Save making a file when it already exists.
then
    true
else
    PASTENUM="$RANDOM"

    mkdir -p $HACKENV/paste

    url paste/paste."$PASTENUM"
    cat -- "${1--}" > $HACKENV/paste/paste."$PASTENUM"
fi