Just a quick exercise I think might be useful in working out how good you are at shell scripting...
Okay, it's boring, but here's your exercise for today:
Create an addressbook program using the bourne or bourne-again shell.
It should use functions to perform the required tasks.
It should be menu-based, allowing you the options of:
You will also need a "display" function to display a record or records when selected.
Name [ John Smith ] Phone [ 12345 ] 54321 Email [ [email protected] ]Remove the old record, and add the new one. Alternatively, edit the existing record, though this may be more difficult.
(^d, CR, ^c, etc)
)Create a shell script to traverse through a filesystem tree.
Example answers here:
example
My Shell Scripting books, available in Paperback and eBook formats. This tutorial is more of a general introduction to Shell Scripting, the longer Shell Scripting: Expert Recipes for Linux, Bash and more book covers every aspect of Bash in detail.
Shell Scripting Tutorial is this tutorial, in 88-page Paperback and eBook formats. Convenient to read on the go, and in paperback format good to keep by your desk as an ever-present companion. Also available in PDF form from Gumroad:Get this tutorial as a PDF | Shell Scripting: Expert Recipes for Linux, Bash and more is my 564-page book on Shell Scripting. The first half covers all of the features of the shell in every detail; the second half has real-world shell scripts, organised by topic, along with detailed discussion of each script. |