I have a text file (call it infile.txt) where the columns have headers and are delimited by semicolons. A subset of it is reproduced below:
SCHCD; SCHNAME
13110208001; GOVT MIDSCHOOL
10110208002; GOVT HIGHSCHOOL
21110208101; MATRIC
21110208102; UPPER SECONDARY
13110208201; SECONDARY
I want a subset of the file where the first two characters of “SCHCD” is “13”. So my subset (call it outfile.txt) should look like:
SCHCD; SCHNAME
13110208001; GOVT MIDSCHOOL
13110208201; SECONDARY
With
awk: