I have the following text file and I want to create a shell script that will allow some processing on the first column depending on the value of the second column ie the script logic is like this ;
FOR EACH RECORD IN THE FILE
DO
LIST THE 2ND FIELD
IF 2ND FIELD IN (aaa,bcdf,EFEFET)
DO SOME SHELL PROCESSING USING THE FIRST FIELD
FI
DONE
The file is ;
02341 JOBA_23456
01231 AGDSFFDTB
63521 AFSGHD
01122 MJGDX_12345
FOR EACH RECORD IN THE FILE
DO
LIST THE 2ND FIELD
IF 2ND FIELD IN (aaa,bcdf,EFEFET)
DO SOME SHELL PROCESSING USING THE FIRST FIELD
FI
DONE
The file is ;
02341 JOBA_23456
01231 AGDSFFDTB
63521 AFSGHD
01122 MJGDX_12345