I want to write a series of the character
-, the amount equaling to 50% of the terminal window column size.
I already have the column size. Let's say the terminal column size is 30. My desired end result would be a String variable containing this:
echo $column_width --------------- # That is 15 x "-"
How should I go about building this variable? Should I loop through 0 < $column_width and concatenate a "-" for each iteration, or is there a smarter way? In case you wonder, this is just some stuff for a bash prompt.