Shell script to read lines in a text file and filter user data
I have this file [myfile.txt] with some user data.
. // and so on
So what I want to do is to take out (to a file) the missing fields as following format:
<FName> <LName> <Company> Missing Field/s:<> <>
eeee asdg gggg Missing Field/s: Salary Age
aara bdbm kkkk Missing Field/s: Salary
CAN ANYONE HELP ME PLEASE !!!!!!!!!!!!!!!
I do have to assume things to solve this:
1) fields 1, 2 and 4 (FName, LName and Company) are always present,
2) rest of the fields could be missing.
I came up with this:
Thank you very much....for your great help.
Nice solution, but......
1) It prints all the lines, not just the faulty ones,
2) The "Missing Field/s:" part is missing in your output.
2) i left the output un-formatted for the OP to do if he desires. What is important is the logic
|All times are GMT -5. The time now is 09:36 PM.|