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

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -