Are aliases available in shell scripts?

I define aliases and save in rc file. what I see is that it isn't available in shell scripts. They are however available in interpretive or interactive sub-shell which I get when I give command

bash

For ex.:

I define 
alias echo='echo -n'

it's unavailable in shell scripts but sub-shells.

Hi
I suppose you're using an interactive bash shell, and you have modified the .bashrc, can you try to disconnect and reconnect to the Unix environment?

rc file gets sourced whenever user gets into a sub-shell, and hence the aliases gets reflected in sub-shell. This is not the case for shell script. To get the aliases inside the shell script, you need to source your file containing the aliases manually.

Guru.

Guru, how to do manually ? and also please elaborate on your points so that it is clear

To make your aliases work inside shell script, add a line like this in the beginning of your shell script:

source .bashrc #Assuming your shell is bash and rc file is .bashrc

Guru.

Most shells do not support aliases inside shell scripts.

Aliasing echo into something else is a bad idea. If you want 'echo -n' all the time, use a command that supports \n in the first place, like printf, instead of redefining the universe.