I have a very large file that comes to us daily but unfortunately that there is an error and produce quite a bit of reject in the reject.dat file
The error is that there is .n after HH:MM:SS where n could be ANY DIGITS
I used the command below to grep for the parttern where n has 1 digit
grep "[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]" badfile.dat
as for n with 2 digits I repeat the same command but this time after the . it should have two [0-9]
grep "[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9]" badfile.dat
My question is is there a way to grep all regardless how many n's digit there be?
The error is that there is .n after HH:MM:SS where n could be ANY DIGITS
I used the command below to grep for the parttern where n has 1 digit
grep "[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]" badfile.dat
as for n with 2 digits I repeat the same command but this time after the . it should have two [0-9]
grep "[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9]" badfile.dat
My question is is there a way to grep all regardless how many n's digit there be?