-2

After executing the command in the bash terminal :

printf 'A%.0s' {1..20}

A string consisting of twenty "A" characters will print to the terminal string. What is annoying is that the command prompt will follow directly behind the printed string, which clutters the terminal and looks unsightly, looks like this :

AAAAAAAAAAAAAAAAAAAAubuntu@ubuntu-VirtualBox:~/Desktop$

That looks terrible. Is it possible to get the command prompt :

"ubuntu@ubuntu-VirtualBox:~/Desktop$"

To appear below the printed sequence of characters?

Thank You.

H3G3moKnight
  • 123
  • 1
  • 9
  • 1
    `printf "$(printf 'A%.0s' {1..20})\n"` – builder-7000 Sep 05 '18 at 03:58
  • To be POSIX compliant and not mess up your prompt make sure your final [Line](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206) terminates with a `` character (e.g. `'\n'`). – David C. Rankin Sep 05 '18 at 05:36

1 Answers1

2

Try bellow command and visit ( http://tpcg.io/5IFLfl ) to execute online :

printf "$(printf 'A%.0s' {1..20})\n"