i have a file which lists people.
each person is either
type 0 or type 1 people
and each person has an ID.
each line in the file represents a person.
the file is not sorted in any way not by id nor by type.
how to take the data from that file
so i will create two files sorted by ID and each file has people with the same type