annotate bin/sledp @ 11484:656bf2e6b793 draft

<shachaf> sled bin/sledp//s#sed#echo "\\$key//"; &#
author HackEso <hackeso@esolangs.org>
date Thu, 12 Apr 2018 03:47:48 +0100
parents 107d5e37318e
children 4118a635d290
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11484
656bf2e6b793 <shachaf> sled bin/sledp//s#sed#echo "\\$key//"; &#
HackEso <hackeso@esolangs.org>
parents: 11482
diff changeset
1 [[ "$1" == ?*//* ]] || { echo 'usage: sled file//script'; exit 1; }; key="${1%%//*}"; value="${1#*//}"; [[ -f "$key" ]] || { echo 'Rosebud!'; exit 1; }; echo "$key//"; sed "$value" "$key" ;