13
rated 0 times
[
13]
[
0]
/ answers: 1 / hits: 2119
/ 3 Years ago, sat, june 26, 2021, 2:43:17
I need to run repeatedly (every 3600 seconds) the following commands from the terminal:
if whois abcxyz.com | grep -q 'string'; then
echo 'Message line 1'
echo 'Message line 2'
fi
I tried using watch, as follows:
watch -n 3600 if whois abcxyz.com | grep -q 'string'; then
echo 'Message line 1'
echo 'Message line 2'
fi
but I get error messages.
Could you please help me make it work?
Thanks
More From » bash