6.4 Execute a BASH script
We have discussed three approaches on how to write BASH code to a file. Let’s now see on how to launch the BASH script!
A script can be executed by calling its name
We get a “permission denied” error, since for security reasons, no one has the right to execute a file on Unix by default. We can see the permissions for a files (and directories) by typing
Nine columns appear. Those represent the following:
- column: the file type and the file permissions.
- column: the number of memory blocks.
- column: the user (the one who has administrating power).
- column: the group of the user.
- column: the file size.
- column: the month the file/directory was last modified.
- column: the day the file/directory was last modified.
- column: the time the file/directory was last modified.
- column: the name of the file or the directory.