Mercurial > repo
comparison bin/sled @ 8236:679213584739
<shachaf> sled bin/sled//s-sedk-sled-
author | HackBot |
---|---|
date | Tue, 31 May 2016 03:58:10 +0000 |
parents | 1a01adc0d78a |
children | e95716889267 |
comparison
equal
deleted
inserted
replaced
8235:1a01adc0d78a | 8236:679213584739 |
---|---|
1 [[ "$1" == ?*//* ]] || { echo 'usage: sedk file//script'; exit 1; }; key="${1%%//*}"; value="${1#*//}"; [[ -f "$key" ]] || exit 1; sed -i "$value" "$key" && { echo -n "$key//"; cat "$key"; } | 1 [[ "$1" == ?*//* ]] || { echo 'usage: sled file//script'; exit 1; }; key="${1%%//*}"; value="${1#*//}"; [[ -f "$key" ]] || exit 1; sed -i "$value" "$key" && { echo -n "$key//"; cat "$key"; } |