Answer the question
In order to leave comments, you need to log in
How to stop command output through BASH?
Greetings
There is a program at the start of which, it starts writing to the terminal 2 lines every 10 seconds, pauses - an empty line.
How to output one result and terminate the program?
Answer the question
In order to leave comments, you need to log in
What is the team?
Option 1: look at the help for this command - a lot of commands provide exit options after displaying n results, for example ping, which by default writes until interrupted.
Option 2: run it in the background, pause for a few seconds and kill it, for example
mycommand &; sleep5; killall mycommand
Option 3: mycommand | head -<strings>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question