[Solved] What does the term “executable “mean in a bash script? [closed]


If i understand your question “executable” is a file with execute permission. The execute permission grants the ability to execute the file.

You can set the execute permission with chmod, for example:

nano script.sh       // your script
chmod +x script.sh
./script.sh

In the first line I create the file using nano (i choose nano because I read you have used that). In the second line because I want run the script just created I must to allow it being executable. I can do it using the chmod program (you can learn more about chmod typing man chmod). So I set the execute permission using chmod with the +x option. Now I could check if script.sh has the execute permission with the command ls -l script.sh.

-rwxr-xr-x  1 Mpac  staff  8456 31 Feb 12:00 script.sh

Finally, in the last line I run the script.

1

solved What does the term “executable “mean in a bash script? [closed]