How can I repeat the character - n times in shell? I have read and tried this, but this does not work for -. It throws error invalid option>
-
invalid option>
This has been my goto for years... not AIX friendly though. Change the last character to change the repeating character which makes up the line
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' _