Hi all..
I'm new to this forum. I'm learning shell script by myself. So, when i face with problem, i have no1 to ask. I hope, you all will help me out. I've been hitting my head with the wall for several times to get the answer to the following problem. I REALLY AM desperate to get the answer . Here is the question that i found from a shell script tutorial website.
Write a Linux shell script that takes two arguments. These arguments can be files or directories. If two files are supplied, check if they have the same content and print a success or failure outcome.
If first argument is a file and the other is a directory, check if files exist in the directory and copy it if it is a newer version. If it doesn't exist, create a link in target directory.
If first argument is a directory and second argument is a file, user is prompted to choose whether to archive content of directory to file or extract archive from file to directory.
If BOTH arguments are directories, copy all files in first directory to second directory.
Your script should make sure that newer versions of files only are copied and report on each file when it is not the case. Make sure your script handle all error checking.
This is it.... Please help me to write a script for it. Thank you so much for your kind help. I need your help urgently.