How can I search a file and extract the last word from this file and read it into a variable.