I need help to write a Korn Shell Script for Unix with the following features.
First of all, please suppose you have a Unix directory with the following content:
1) ALPHA_PIPPO_PLUTO_0001.xml 2) ALPHA_PIPPO_TOPOLINO_0001.xml 3) BETA_MINNIE_OMEGA_0002.xml 4) BETA_OMICRON_PHI_0002.xml 5) DELTA_WHY_NOT_0001.xml 6) DELTA_BECAUSE_WHY_0002.xml
a) File 1 and File 2 begin with ALPHA and end with 0001: I have to create a tar file named ALPHA_0001.tar which contains these two files;
b) File 3 and File 4 begin with BETA and end with 0002: I have to create a tar file named BETA_0002.tar which contains these two files;
c) File 5 begins with DELTA and end with 0001: I have to create a tar file named DELTA_0001.tar which contains only this file;
d) File 6 begins with DELTA and end with 0002: I have to create a tar file named DELTA_0002.tar which containts only this file.
How could I achieve this in Unix Korn Shell?
Thank you very much for considering my request.