# Usage: <file> <name> <grep-string> <value>
apply_optional_replacement() {
if test -n "$4"; then
- echo "$1: using $2 $4"
+ printf '%s: using %s %s\n' "$1" "$2" "$4"
generate "$1" '' simple_cpp \
"$3" -- "$4"
else
- echo "$1: removing $2 display"
+ printf '%s: removing %s display\n' "$1" "$2"
grep_i -v "$3" "$1"
fi
}