Mercurial > repo
annotate bin/sled @ 8839:34f2c0d8a6e8
<wob_jonas> learn anagol is Anarchy Golf, code golf server at http://golf.shinh.org/
author | HackBot |
---|---|
date | Sun, 24 Jul 2016 12:33:11 +0000 |
parents | c6382f86a76d |
children |
rev | line source |
---|---|
8265
c6382f86a76d
<oerjan> sled bin/sled//s/exit 1; sed/{ echo \'Rosebud!\'; exit 1; }; sed/
HackBot
parents:
8264
diff
changeset
|
1 [[ "$1" == ?*//* ]] || { echo 'usage: sled file//script'; exit 1; }; key="${1%%//*}"; value="${1#*//}"; [[ -f "$key" ]] || { echo 'Rosebud!'; exit 1; }; sed -i "$value" "$key" && { echo -n "$key//"; cat "$key"; } |