Why do I get those strange spaces?
echo "hello world" | awk 'BEGIN{FS=""} {$1=toupper($1); printf "%s\n", $0}'
I get the same result with the simpler way.
echo "hello world" | awk 'BEGIN{FS=""} {$1=toupper($1); print}'
Output:
H e l l o w o r l d