I have a 'records.txt' file that contains over 200,000 records.
Each entry is on a separate line and has several fields separated by a separator '|'.
Each line should have 35 fields, but the problem is that one of these lines has <> 35 fields, i.e. <> 35 '|' characters.
Can anyone suggest a way on Unix with which I can define a string. (How to get the number of characters '|' in each line of a file)
source
share