Mercurial > repo
view bin/sled @ 8601:051bf11c8692
<int-e> ` ( echo \'main=putStr s>>print s\'; echo \'s="main=putStr s>>print s\\ns="\' ) > quines/haskell
author | HackBot |
---|---|
date | Sat, 25 Jun 2016 09:37:35 +0000 |
parents | c6382f86a76d |
children |
line wrap: on
line source
[[ "$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"; }