I have an executable file command.sh
#/bin/bash
alias my_command='echo ok'
my_command
My terminal is bash.
When I run it like ./command.sh
, it works fine.
When I run it like /bin/bash ./command.sh
, it can't find a my_command executable.
When I run it like /bin/sh ./command.sh
, it works fine.
I'm confused here. Where's the problem?