by ehamberg · 12y ago · 0 comments
<━> 9473, U+2501 BOX DRAWINGS HEAVY HORIZONTAL
hr(){printf '━%.0s' $(seq $COLUMNS)} centered_output '=' ''
[1] https://github.com/ppurka/sh_functions/blob/master/my_bash_f... $ hr() { printf '\e(0'; printf 'q%.0s' $(seq $(tput cols)); printf '\e(B'; }
Same thing, but potentially more portable.edit: Could also use tput instead of $COLUMNS. Sometimes the $COLUMNS may not always be updated (bash's checkwinsize option).