I created a shell script "/etc/aaa" on Openwrt which contains the following code:
#!/bin/sh
echo "Hello World!"
I also used this command to ensure the proper permissions:
chmod 777 /etc/aaa
Upon executing with any of the below 2 commands
sh /etc/aaa
or
ash /etc/aaa
it works well and prints "Hello World". The problem occurs when I try to execute it with this command:
/etc/aaa
where I get this error:
-ash: /etc/aaa: not found
Can anyone please explain why this is happening? What am I missing here?