Advanced Exercises

9.What lines do you need to change in the Bourne Again Shell script command_menu (page 654) to make it a TC Shell script? Make the changes and verify that it works.
10.Users often find rm (and even rm –i) too unforgiving because it removes files irrevocably. Create an alias named delete that moves files specified by its argument(s) into the ~/.trash directory. Create a second alias, named undelete, that moves a file from the ~/.trash directory into the working directory. Finally, put the following line in your .logout file to remove any files that you deleted during the login session:
/bin/rm -f $HOME/.trash/* >& /dev/null 

Explain what could be different if the following line were put in your .logout file instead:

 rm $HOME/.trash/* ...

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.