ubuntu - How can i do "-" * 60 for Unix command line -


this question has answer here:

if want print 60 dashes.

somehow

echo "-" * 60.

how can this? thanks.

printf "%*s" 60 "" | tr " " "-" 

the printf command prints empty string padded spaces fit width of 60. tr converts spaces dashes.

this not print trailing newline. if want one, add ;echo end of command.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -