grep It filters out output # -C return 5 lines up and 5 lines down the line where the criteria is matched cat text.txt | grep -C 5 "password"` Last update: 2023-05-02 Created: March 4, 2023 12:42:52