Draw a horizontal line from dash character occupying the full width of a terminal in bash April 6, 2024 by Tarik Try with: echo some text printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - echo some text