MasterXandrex
November 9th, 2007, 02:39 AM
All,
I need a bit of help. I need to write a bash script that will take in two (relative) directories and move files into a third directory in the following manner:
1) If and only if a command line switch is given, any file existing in one directory but not the other should be moved to the new directory.
2) When two files have identical names, the newer one should be moved to the new folder.
Come to think of it, there may be a command that does this i just don't know. Any help you can provide would be appreciated.
Oh, also, here's one hitch, anything I write needs to work on Enterprise Solaris, but don't worry about that so much, I can test and tweak it to make it work. I just need to know where to start.
Thanks,
Xan
I need a bit of help. I need to write a bash script that will take in two (relative) directories and move files into a third directory in the following manner:
1) If and only if a command line switch is given, any file existing in one directory but not the other should be moved to the new directory.
2) When two files have identical names, the newer one should be moved to the new folder.
Come to think of it, there may be a command that does this i just don't know. Any help you can provide would be appreciated.
Oh, also, here's one hitch, anything I write needs to work on Enterprise Solaris, but don't worry about that so much, I can test and tweak it to make it work. I just need to know where to start.
Thanks,
Xan