Calling your script

Well, we have our two-line script; time to see if it really does what we want it to do:

gzarrelli:~$ ./ ./ Permission denied  

No way! It is not executing, and from the error message, it seems related to the file permissions:

gzarrelli:~$ ls -lah -rw-r--r-- 1 gzarrelli gzarrelli 41 Jan 21 18:56  

Interesting. Let us recap what the file permissions are. As you can see, the line describing the properties of a file starts with a series of letters and lines.










For type, we can have two main values, d - this is actually a directory, or - and means this is a regular file. Then, we can see what permissions are set for the user owning ...

Get Mastering Bash now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.