Beruflich Dokumente
Kultur Dokumente
2 -l <sortcolumn> where <sortcolumn> is one of {firstname, lastname, email, phone}. Lists all entries sorted by the given column. You can use the following code-block to process the parameters: case $1 "-a" "-d" "-f" "-l" esac in ) add;; ) shift; delete $*;; ) shift; find $*;; ) shift; list $*;;
add, delete, nd and list are four functions which you will have to implement. b) Implement the add function. It should query the user for rst name, last name, email and phone number. For the email, it should be checked whether the entered string is a valid email address. If not, the user should be asked again. Accepted telephone numbers should consist of numbers and whitespaces, one - or / is allowed as separator, e.g.: 089 289 18 636 089 / 289 18636 089-28918636 Use regular expressions to ensure that all such phone numbers are accepted. Before storing them, you should transform them such that they match the pattern [[:digit:]]\+/\?[[:digit:]]\+, which means that all whitespaces should be removed and only / should be used as a separator (or no separator at all). c) Implement all other functions (delete, nd, list)