Lists occurrences of a given word found in a given file
Uses linked-lists of linked-lists to store multiples occurences of the word on the same line
gcc myGrep.c wordList.c wordList.h
Flags used during development: -Wall -Werror -ansi -pedantic
./a.out <word> <filename>
- ./a.out the sample.txt
- Longest line (50 characters): Polyana, in the province of Tula. His mother died
- Number of lines: 17
- Total occurrences of "the": 7
- Line 1, word(s) 4: August 28, 1828, at the family estate of Yasnaya
- Line 2, word(s) 2: Polyana, in the province of Tula. His mother died
- Line 4, word(s) 2: Placed in the care of his aunts, he passed many
- Line 7, word(s) 1, 7: entered the university. He cared little for the
- Line 11, word(s) 4: English, and Russian novels, the New Testament,
- Line 12, word(s) 6: Voltaire, and Hegel. The author exercising the