How can I add spaces between every character or symbol within a UTF-8 document? E.g. 123hello! becomes 1 2 3 h e l l o !.
123hello!
1 2 3 h e l l o !
BASH
OpenOffice.org
gedit
Shortest sed version
sed
sed 's/./& /g'
$ echo '123hello!' | sed 's/./& /g' 1 2 3 h e l l o !
Obligatory awk version
awk
awk '$1=$1' FS= OFS=" "
$ echo '123hello!' | awk '$1=$1' FS= OFS=" " 1 2 3 h e l l o !
2.1m questions
2.1m answers
60 comments
57.0k users