I have a very wierd case... If I run a script with /bin/bash, it can't recognize aliases that I set even inside the script. And the most strange thing is
$ cat -n test.sh 1 #!/bin/bash 2 alias somecommand='ls -alF' 3 alias 4 somecommand $ ./test.sh alias somecommand='ls -alF' ./test.sh: line 4: somecommand: command not found
... as shown above, if I run the command "alias" in the script it turns out that bash has taken somecommand into the aliases, but if I run the somecommand itself it will still not be recognized!
Everything is right if I use the command "sh" to run the script.. so is it a bug of bash? Or is there something I'm missing?
Any help is appreciated!