I have to copy a particular file present in a main folder having part of the file-name present in many sub-folders to a new destination preserving the name of the source "part of the main folder" and previous file-name of the output file:
Example:
From /005_0/1000/005.xxx -> /copy/005_1000.xxx
From /005_0/1001/005.xxx -> /copy/005_1001.xxx
From /005_0/1002/005.xxx -> /copy/005_1002.xxx
From /005_0/1003/005.xxx -> /copy/005_1003.xxx
From /005_1/1004/005.xxx -> /copy/005_1004.xxx
From /005_1/1005/005.xxx -> /copy/005_1005.xxx
From /006_0/1006/006.xxx -> /copy/006_1006.xxx
From /006_1/1007/006.xxx -> /copy/006_1007.xxx
From /006_1/1008/006.xxx -> /copy/006_1008.xxx
...
Can someone give me the command to type under RedHat (csh and bash) please? - Many thanks