I added my script called mylovelyscript.sh
to /bin/
folder. My script contains code that echo
s text with different text colors. But when I run my script like
$ mylovelyscript
it executes in bash mode. So, my script give an output with the texts with color codes, like
\e[93mHello World!
but not colored texts. But when I run my script like $ sh mylovelyscript.sh
with sh
command, it executes like how I want. Now, I want my script to give me colored texts like in sh
mode, but in this case I want to call my script like $ mylovelyscript
, not like $ sh mylovelyscript
. How can I do it? Thanks!
Put this line at the beginning of the file:
#!/bin/sh
or:
#!/bin/dash