How can I repeat a character in Bash?

You can use: printf ‘=%.0s’ {1..100} How this works: Bash expands {1..100} so the command becomes: printf ‘=%.0s’ 1 2 3 4 … 100 I’ve set printf’s format to =%.0s which means that it will always print a single = no matter what argument it is given. Therefore it prints 100 =s.

How does one output bold text in Bash?

The most compatible way of doing this is using tput to discover the right sequences to send to the terminal: bold=$(tput bold) normal=$(tput sgr0) then you can use the variables $bold and $normal to format things: echo “this is ${bold}bold${normal} but this isn’t” gives this is bold but this isn’t

How can I suppress all output from a command using Bash?

The following sends standard output to the null device (bit bucket). scriptname >/dev/null And if you also want error messages to be sent there, use one of (the first may not work in all shells): scriptname &>/dev/null scriptname >/dev/null 2>&1 scriptname >/dev/null 2>/dev/null And, if you want to record the messages, but not see them, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)