Skip to content

simple text-query program. Our program will let a user search a given file for words that might occur in it. The result of a query will be the number of times the word occurs and a list of lines on which that word appears. If a word occurs more than once on the same line, we’ll display that line only once. Lines will be displayed in ascending or…

Notifications You must be signed in to change notification settings

ArbelNathan/Text-Query-Program

Repository files navigation

Text-Query-Program

simple text-query program. Our program will let a user search a given file for words that might occur in it. The result of a query will be the number of times the word occurs and a list of lines on which that word appears. If a word occurs more than once on the same line, we’ll display that line only once. Lines will be displayed in ascending order—that is, line 7 should be displayed before line 9, and so on.

simple start:

run

./a.out phone.txt

when phone.txt is example txt source.

run the following queries: ‫‪

  • NOT‬‬ ‫‪word
  • word1‬‬ ‫‪AND‬‬ ‫‪word2‬‬ ‫‪
  • word1‬‬ ‫‪OR‬‬ ‫‪word2‬‬ ‫‪
  • word1‬‬ ‫‪n‬‬ ‫‪word2‬‬ ‫
  • word

else will show:

‫‪Unrecognized‬‬ ‫‪search‬‬

About

simple text-query program. Our program will let a user search a given file for words that might occur in it. The result of a query will be the number of times the word occurs and a list of lines on which that word appears. If a word occurs more than once on the same line, we’ll display that line only once. Lines will be displayed in ascending or…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published