Write a shell script that copies the files in two directories dir1 and dir2 (supplied as the first two arguments), to dir3 (supplied as the third argument). If dir1 and dir2 contain the files with the same name, then the newer file should be copied to dir3. This does NOT look at the subdirectories of dir1 and dir2. Dir1 and dir2 must be existing directories, and dir3 may not be an existing regular file. The script should produce a usage statement if the script is misused. Name your script cpdirs.sh
- This solution has not purchased yet.
- Submitted On 18 Jan, 2015 09:02:46