annotate paste/paste.30276 @ 12246:f3be034784d0 draft

<b_jonas> addwhatis brachylog(1egobot) - Brachylog, a Prolog-like golf language
author HackEso <hackeso@esolangs.org>
date Thu, 05 Dec 2019 23:44:34 +0000
parents edc576a78ad1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
590
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
1 #!/bin/bash
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
2 if [ ! "$1" ]
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
3 then
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
4 PASTE=-
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
5 else
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
6 PASTE="$1"
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
7 fi
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
8
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
9 PASTENUM="$RANDOM"
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
10
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
11 mkdir -p $HACKENV/paste
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
12
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
13 echo 'http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/paste/paste.'"$PASTENUM"
edc576a78ad1 <kallisti> run paste "`which paste`"
HackBot
parents:
diff changeset
14 cat "$PASTE" > $HACKENV/paste/paste."$PASTENUM"