![]() |
|
|
|
|
|||||||
| 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 |
| Need a simple file based utilty for shell scripts | bobk544 | Shell Programming and Scripting | 4 | 05-01-2007 03:43 PM |
| Need Help With Shell scripts | holler1 | Shell Programming and Scripting | 2 | 07-30-2006 11:43 PM |
| Difference between writing Unix Shell script and AIX Shell Scripts | haroonec | AIX | 0 | 04-11-2006 11:27 PM |
| two simple question on shell scripts.... | moxxx68 | Shell Programming and Scripting | 3 | 10-15-2004 11:51 AM |
| simple shell - how to get a parameter typed in a shell script | cmitulescu | Shell Programming and Scripting | 3 | 12-05-2001 12:04 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi everyone...
i'm new to this shell programming and i want help with the following question... i hope someone can help me ...pls plsssssssssss ========================================================== the question ========================================================== A number of users have changed from Windows to Unix and are missing the ability to restore deleted files from the recycle bin. You are going to provide them with a simple set of scripts which will provide a functionally similar feature, but without the irritating Windows 'do you mean this?' dialogue. In Unix, if you type rm filename the file is deleted. So to cater for those who long for the ability to restore deleted files, this part of the assignment is to write four shell scripts - del, rest, empty and initialise - which will delete a file to the trash can, restore it, empty the trash can or set up the system respectively. The trash can should be a directory called .trash below your home directory. It should be set up by initialise. The specification for del is del filespec, where filespec is one or more files or directories (you should be able to use wildcards). The deleted files should be moved to the trash can. rest should restore a file to its correct directory from the trash can. If you type rest by itself you should get a list of the files in the trash can in the form n For example, 0:/home/smr/msccw/results 1:/home/smr/msccw/delly 2:/home/smr/msccw/tmp You can then type rest 1 to restore the file delly. Note if you delete two files with the same name, they should both be saved in the trash can and you should be able to restore either or both of them. empty will just empty the trash can. initialise just sets up any directories, files etc that the system needs and should be run once before using the other scripts. You may assume that the user has a bin directory which is on their PATH You should make the scripts as robust as possible since they will be used by ex-Windows users. They should be designed to operate from a directory on the users path (e.g. $HOME/bin) You should bundle them up into a self extracting file called safedel. which should be in your bin directory. You should give us read access to this file (Brian and myself). You will lose marks if we can't access it. See the Unix notes for bundle. N.b.Your scripts should be called del, rest, empty and initialise, not some names you would prefer.. |
| Forum Sponsor | ||
|
|