view bin/sled @ 8505:d31866e216a6

<shachaf> undo 8502
author HackBot
date Thu, 16 Jun 2016 17:42:52 +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"; }