I want to limit the time a grep process command is allowed to run or be alive.
For example. I want to perform the following:
grep -qsRw -m1 "parameter" /var
But before running the grep command I want to limit how long the grep process is to live, say no longer than 30 seconds.
How do I do this?
And if it can, how do I return or reset to have no time limit afterwards.