Skip to content
Advertisement

Validating file records shell script

I have a file with content as follows and want to validate the content as

1.I have entries of rec$NUM and this field should be repeated 7 times only. for example I have rec1.any_attribute this rec1 should come only 7 times in whole file.

2.I need validating script for this. If records for rec$NUM are less than 7 or Greater than 7 script should report that record.

FILE IS AS FOLLOWS :::

JavaScript

Please Help

Thanks in Advance… 🙂

Advertisement

Answer

Simple awk:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement