view bin/paste @ 4952:c59c43efc84d

<oerjan> sed -i "4ised -i \'y/"\'\\\\n\'"/ /"\'wisdom/$topic\' bin/learn_append
author HackBot
date Tue, 30 Sep 2014 05:51:08 +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