I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file.
Example:
File1
Name designation dateOfJoining
Shilendra SE 12/28/2007
Brijesh SE 12/25/2007
Sunil JSE N/A
Pankaj SE 12/20/2007
Manish SE N/A
Akhilendra SE 11/20/2007
Then after running the script the file should be like
File1
Name designation dateOfJoining
Shilendra SE 12/28/2007
Brijesh SE 12/25/2007
Pankaj SE 12/20/2007
Akhilendra SE 11/20/2007
And bad file will contain the record for which date was N/A
BadFile
Name designation dateOfJoining
Sunil JSE N/A
Manish SE N/A
Pls help me out as soon as possible.
Thanks.