view misle/rn_append @ 7850:ed98f2c14d01

<hppavilion[1]> mkx bin/culprits2//GOAT=`shuf -n1 share/scapegoats`; hg log --removed -- "$1" | grep summary: | sed "s/hppavilion\\[1\\]/$GOAT/g" | sed "s/ +/ /g" | sed "s/^ //" | awk \'{print substr($2,2,length($2)-2)}\'| sed "s/.$/\\x0F&/" | xargs
author HackBot
date Fri, 06 May 2016 03:18:20 +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"