Accidentially, I found out that
wc counts differently depending on how it gets the input from bash:
$ s='hello' $ wc -m <<<"$s" 6 $ wc -c <<<"$s" 6 $ printf '%s' "$s" | wc -m 5 $ printf '%s' "$s" | wc -c 5
Is this - IMHO confusing - behaviour documented somewhere? What does
wc count here - is this an assumed newline?