Hi all,
I had set up an alias on CSH.
the alias name I am using in a script.
when I am using -
source scriptName
alias name is getting invoked but when I am trying to run same script using -
./scriptName
aliasname: command not found error is coming.
. filename [arguments]
source filename [arguments]
Read and execute commands from filename in the current shell
environment and return the exit status of the last command exe-
cuted from filename.
you are getting the error because you are executing the file by ./filename
in which another shell is created for execution (not the current shell) because alias is not set for the new shell.
Thanks sanjay
Some more doubts
Is there anyway I can create a alias which will be used by all the shells as well as newly created also(something like export)?
During surfing I came across "shopt"
will the use of shopt -s expand_alliases help?
I suppose it is only for bash so is there any CSH equivalent available?