Thanks R.Singh. It did not work.
Is there any other way we can do this by reading the input file first --
something like --
.
Thanks
Hello Indra2011,
awk could read any Input_file by its own no need to use cat here.
You have to show us the complete console output like what's going on there, without that we could only guess.
Also I am coming with this function approach for this question, where you could just mention like how many columns you want to verify.
Following is the code on same too:
1st Scenario: with your asked query. 2nd scenario: Input_file which I have created for checking purposes, a test file
In this above code I have provided 1,2,3,4 fields so it will look for 1st, 2nd, 3rd and 4th fields here. Kindly do check the same and let me know if you have any queries.
EDIT: Adding a NON-one liner form of solution too successfully now. EDIT2: In above code you could change from !$array[i] to $array[i] == "" in case your Input_file may have zero too in any of the columns.
Thanks,
R. Singh
Last edited by RavinderSingh13; 06-05-2017 at 05:33 PM..
Reason: Adding a NON-one liner form of solution too successfully now.