Shall Scripts exercises

I have just 3 things that I really need to know the solution, please allow me to show it.

any help would be nice

script that backup a file. The file name to backup should be provided as input parameter, the backup file should have the same file name with the extension ".bak". If the user provides no input parameter, the script should display an error message. If there is an input file name, but it does not exist, the script should display an error message. If the input file exists, the script should create the backup file and overwrite any existing backup file with the same name.

---

script (called phone) that creates a simple telephone list (create an empty file called �phonlist� in home directory) . Each line in this file consist of two fields name and the phone number, the script should do the following:
When user types the command : �phone new <name> <number>� this will add new record (name,number) to the list.
When user type command: �phone <name>� then the script should search in the file �phonelist� and gets the phone number and display the result.

---

a complex command using pipes to Calculate the number of hits per client in Squid log file (access.log), the command should display most active hosts first.

Line example

1197979501.787 1 10.1.14.62 TCP_NEGATIVE_HIT/404 1463 GET http://url

The output should be like:

34 10.1.14.3
33 10.1.14.5
22 10.1.16.1
18 10.1.18.1

I'm deadly need to understand the solutions, I think its a huge step for me to learn the programming on this script.

thanks

You appear not to have read the rules. Please do so before posting again.