Exercises
1. | Rewrite the journal script of Chapter 12 (example 1, page 620) by adding commands to verify that the user has write permission for a file named journal-file in the user's home directory, if such a file exists. The script should take appropriate actions if journal-file exists and the user does not have write permission to the file. Verify that the modified script works. |
2. | The special parameter $@ is referenced twice in the out script (page 632). Explain what would be different if the parameter $* were used in its place. |
3. | Write a filter that takes a list of files as input and outputs the basename (page 657) of each file in the list. |
4. | Write a function that takes a single filename as an argument and adds execute permission to the file ... |
Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.