I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st file should go to the dir 'OLD_10476031', 2nd file into dir 'OLD_10633009' , 3rd into dir OLD_10345673 and so on.
tried differnt ways in ksh script but want a shrt and efficient script
I have a HP-UX machine and using KSH.
Thanks in advance for help.