echo outputs -e parameter in bash scripts. How can I prevent this?

You need to use #!/bin/bash as the first line in your script. If you don’t, or if you use #!/bin/sh, the script will be run by the Bourne shell and its echo doesn’t recognize the -e option. In general, it is recommended that all new scripts use printf instead of echo if portability is important.

In Ubuntu, sh is provided by a symlink to /bin/dash.

Leave a Comment

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