0
I have this code to print a horizontal line using unicode character \u2501
:
#!/bin/tcsh set horz_line = "'" foreach x (`seq 1 1 80`) set horz_line = "${horz_line}\\u2501" end set horz_line = "${horz_line}\\n'" printf $horz_line
But it is not giving what I expected. I expect the output to look like the one generated by below:
#!/bin/tcsh foreach x (`seq 1 1 79`) printf '\u2501' end printf '\u2501\n'
The reason why I want to try out the code in the first block is because the code in second block works but is slow. When I run the second block code, I can see the whole line being drawn couple of characters at a time.
My thinking was that that's probably because printf
is called 80 times. So I am trying out the first block approach where I generate a string of \u2501\u2501.. (80 times)
and call printf
just one to print that.
Good find! For me it had to be one backslash:
check="\u2718"
then laterprintf "`echo -e $check`"
– Heath Raftery – 2019-08-08T13:20:52.860