I just want to echo spaces until it fills the size of the terminal.
I can just write spaces between the quotation marks but it takes time and also it looks bad.
I tried simple things like
a=" "*100 or a=(" "*100) & echo $a
but it won’t work.
Is there any way like Space(100) or a better way than typing spaces.
>Solution :
Like this, using Perl:
perl -sE 'say " " x $col' -- -col=$COLUMNS
Or the most simple:
printf '%*s' $COLUMNS " "
The variable $COLUMNS is the number of columns in your shell.