responsibility - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- responsibility (538B) --- 1 #!/bin/sh 2 3 template="$HOME/bin/modules/responsibility/say-no-to.vtv" 4 replacemarker="{PLEASE_REPLACE_THIS}" 5 replacelength="$(utf8expr length "${replacemarker}")" 6 replaceneutral="' ' ' ' ' ' ' ' ' ' '" 7 8 inputreplacement="$@" 9 if [ -z "$inputreplacement" ]; 10 then 11 replacement="$replaceneutral" 12 else 13 replacement="$(utf8expr substr "$(printf "%*s" $replacelength "${inputreplacement}")" 1 $replacelength)" 14 fi 15 16 replacement="$(printf "%s\n" "$replacement" | tr '[:lower:]' '[:upper:]')" 17 18 sed "s|{PLEASE_REPLACE_THIS}|$replacement|g" $template 19 20