view bin/paste @ 5355:98b177574362

<mroman> learn APL is the programming language everyone secretely wants to use but can\'t admit it in public IRC channels.
author HackBot
date Tue, 05 May 2015 14:41:50 +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