Quote:
Originally Posted by
michaelrozar17
Post sample input file removing the line numbers and the expected output.
ok , i start from very beginning ;
imagine i have a text with 3700 lines
"You are to write a script that takes a file name and a word as
input. You will then locate all lines within the file ($1) which
contain that word ($2) -- but there is a twist. The word must
appear at the END of the line, but not exactly: there must be a
period after the word.
In other words, you are finding all lines which have the given
word as the last word in a sentence, with this sentence finishing
at the end of the line also.
But you are not done. You will filter your above grep results so
that you only consider matches on the evenly number lines."
then i will get the middle line among all of these even numbered matches "
that s the work i have to do , this is the original explanation