Hi ,
Can anyone help me how do perform below requirement in unix.
Step1:we will receive multiple files weekly with same name(as below) in a folder(In folder we will have other files also def.dat,ghf.dat)
Filenames:
1)
abc_20171204_052389.dat
2)
abc_20171204_052428.dat
Moderator's Comments:
|
|
DON'T modify posts if others already referenced it, pulling the rug from under their feet!
|
|
Step2:we should pick the file which has received date within the past 3 days.
step3:We should read the files which has text ‘
S A M P L E’ in the files starting at position 31 on line 19 .
step4:Once we identify the file which has text ‘
S A M P L E’ than pick that file and should look for '
GENERIC' and copy all the data which has '
GENERIC' to
other file.