Mercurial > repo
view bin/sedk @ 8234:863f4323bc8c
<shachaf> sedlast s\x0foperation\x0fscript\x0f
author | HackBot |
---|---|
date | Tue, 31 May 2016 03:54:14 +0000 |
parents | 672e5f263e1b |
children |
line wrap: on
line source
[[ "$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"; }