view misle/rn_append @ 11317:16da968350f1

<zzo38> slashlearn cricket//Cricket is one team is in and one team is out, and the team who are out try to get the team who is in to be out, and then the team who was previously out can be in. Whoever earn more points wins, unless you run out of time, in which case nobody wins.
author HackBot
date Sun, 14 Jan 2018 03:44:32 +0000
parents ded267d9c0ad
children
line wrap: on
line source

#!/bin/bash
[[ "$1" = */* ]] || exit
topic=$(echo "$1" | lowercase | cut -d / -f 1)
[ -z "$topic" ] && exit 1
stuff=$(echo "$1" | cut -d / -f 2-)
perl -i -p -e 's/\n/ /' "tmflry/$topic"
echo "$stuff" >>"tmflry/$topic"
echo -n "Was lied to about '$topic': "
cat "tmflry/$topic"