It's still not working correctly.
The code and files I am using are
egrep -v '^([0-9]\{7\}|[0-9]\{9\})/[0-9],[0-9A-Z]\{1,12\},[^ ]\{1,6\}$' test_saw.txt >> errors_saw.txt
test_saw.txt :-
0123456/1,AB,21
0321654/2,BC,22
02345678/3,CD,23
0987654/4,DE, 24
0654321/5,Ef,25
errors_saw.txt...
I tried this but I keep getting
grep: illegal option -- E
I'm on a server using Oracle 9i, would this make any difference to the options available to me?
I am trying to check a line of data using grep. The data I have in the file should be in the format
0123456/1,xxx,xxx etc
or
012345678/1,xxx,xxx etc
The first field must either be 7digits/1digit or 9digits/1digit, but cannot be 8digits/1digit.
So far i have '[0-9]\{7\}/[0-9]' but can...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.