Scripting help needed.
I am having difficulties writing a bash script to compare files in one directory to a second directory. If the file in the second directory is newer, delete the file from the first directory and copy the file from the second directory to the first. To add to difficulty, the file names have a base with numbers. The numbers are revision identifiers. For example,
directory 1 ... file thefile-0.1.3.0 compare to thefile-0.1.3.1. The second file is newer. Delete the first file and copy the new file to directory 1.