Good morning gurus
Mi name is Raul and I'm trying to write a simple script to validate the data
within a huge ascii file.
The data within the file looks like this:
Function160 599644.00 2160206.00 7759.0000 4897.0000
Function160 599644.00 2160206.00 7843.0000 4915.0000
Function160 599644.00 2160206.00 8000.0000 4951.0000
#
Function240 600242.00 2159405.00 0.0000 1534.0000
Function240 600242.00 2159405.00 132.0000 1653.0000
Function240 600242.00 2159405.00 190.0000 1646.0000
I'm tring to write a RegExp to do the validation. I'm using egrep but I'd
rather prefer to use awk but I'm newbie and don't know how.
Anyway, this is what I've got:
egrep '[A-Za-z][0-9]\{12\} *[0-9]\{6\}\.[0-9]\{2\} *[0-9]\{7\}\.[0-9]\{2\} *[0-9]\{4\}\.[0-9]\{4\} *[0-9]\{4\}\.[0-9]\{4\}' file
And is "almost" working. But the first part, the one that should match Function120 (might be Function2367 too) is not
working.
Any help and/or suggestion would be appreciated.
Thank you very much in advance !!!
Mi name is Raul and I'm trying to write a simple script to validate the data
within a huge ascii file.
The data within the file looks like this:
Function160 599644.00 2160206.00 7759.0000 4897.0000
Function160 599644.00 2160206.00 7843.0000 4915.0000
Function160 599644.00 2160206.00 8000.0000 4951.0000
#
Function240 600242.00 2159405.00 0.0000 1534.0000
Function240 600242.00 2159405.00 132.0000 1653.0000
Function240 600242.00 2159405.00 190.0000 1646.0000
I'm tring to write a RegExp to do the validation. I'm using egrep but I'd
rather prefer to use awk but I'm newbie and don't know how.
Anyway, this is what I've got:
egrep '[A-Za-z][0-9]\{12\} *[0-9]\{6\}\.[0-9]\{2\} *[0-9]\{7\}\.[0-9]\{2\} *[0-9]\{4\}\.[0-9]\{4\} *[0-9]\{4\}\.[0-9]\{4\}' file
And is "almost" working. But the first part, the one that should match Function120 (might be Function2367 too) is not
working.
Any help and/or suggestion would be appreciated.
Thank you very much in advance !!!