Below I have code that takes a test file, splits it into two groups: Apollo and Sabre, and is supposed to tell me how many times the word "Processed" is used in each group, however whenever I run this, it just tells me how many lines the file is, which I already know. Could someone please explain why this is not working and a solution on how to fix this?
var lines1 = File.ReadLines(path);
List<string> apollo = lines1.Take(7678).ToList();
List<string> sabre = lines.Skip(7678).Take(5292).ToList();
var g = apollo.GroupBy(i => i);
foreach (var grp in g)
{
Console.WriteLine("{0} {1}", grp.Key, grp.Count());
}