Find the last line of the sorted history, extract the last word, and search for the string "echo" in the file with that name, displaying the line number and the filename.
history | sort -n | tail -n 1 | grep -o "[^ ]*$" | xargs grep -inH "echo"