0

How can I kill the tail process after having found special command

tail -f filename | grep -m1 " special string" | tee txtfile

After founding the "special string" the tail function needs to be killed to execute the rest of the program.

Gaurav Baghel
  • 37
  • 1
  • 9
  • 2
    [How to stop the tail when sed finds the string?](https://unix.stackexchange.com/questions/615395/how-to-stop-the-tail-when-sed-finds-the-string) -- same class? – glenn jackman Oct 20 '20 at 12:14
  • 5
    Does this answer your question? [How to stop the tail when sed finds the string?](https://unix.stackexchange.com/questions/615395/how-to-stop-the-tail-when-sed-finds-the-string) –  Oct 25 '20 at 21:23

0 Answers0