79174073

Date: 2024-11-10 03:10:27
Score: 1
Natty:
Report link

I think the reason that you are unable to run the shell script through ./li.sh is because you haven't set the file permission to executable

You could have a look at this https://www.redhat.com/en/blog/linux-file-permissions-explained

tldr; you can run sudo chmod +x li.sh and then continue to proceed with ./li.sh

Assuming you are in the same directory when u run bash li.sh and ./li.sh , it should both work the same way. When you specify bash li.sh , it first runs bash and executes the file , where as when you run ./li.sh , it reads the file , sees that there is the #! symbol , it will run /bin/env bash , and then it will continue the script

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Cleff