correct unicode char output and eliminate a (sub-)process invocation

recipe from http://wiki.bash-hackers.org/snipplets/print_horizontal_line