![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling expect scripts from other expect scripts | seva | Shell Programming and Scripting | 0 | 04-03-2008 10:45 AM |
| scripts | rakshit | HP-UX | 1 | 01-15-2008 01:52 AM |
| exercises in shell | rohitv | UNIX for Dummies Questions & Answers | 1 | 09-21-2006 03:23 PM |
| su in scripts | soots | Shell Programming and Scripting | 6 | 10-27-2005 05:40 AM |
| Scripts | GW01 | UNIX for Dummies Questions & Answers | 3 | 12-11-2002 04:06 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
| Forum Sponsor | ||
|
|
|
||||
|
You appear not to have read the rules. Please do so before posting again.
|
||||
| Google The UNIX and Linux Forums |