@@ -0,0 +1,16 @@
#!/hint/bash
function shasum {
command shasum <<<"$1" | awk '{ print $1 }'
}
# once <command>
function once {
local flagname="__onceflag_$(shasum "$*")"
if [[ -z ${!flagname} ]]; then
declare -g "${flagname}"=1
"$@"
fi
The note is not visible to the blocked user.