After writing a shell script we have to give it execute permission so that it can be run in Unix shell.
We can use chmod command to change the permission of a file in Unix. In general we use chmod +x to give execute permission to users for executing the shell script.
E.g. chmod +x abc.txt will give execute permission to users for executing the file abc.txt.
With chmod command we can also specify to which user/group the permission should be granted. The options are:
- u is the owner user
- g is the owner group
- o is others
- a is all users