[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: watch and beep



On Fri, Nov 30, 2012 at 09:31:33AM +0000, Paweł Ch. wrote:
>    I would like to hear beep when command output "watch dig @ns.domain.tdl
>    domain.tdl soa" appear with string "2012113005".
>    Which command performs this task.

How about:

while true; do
if dig @ns.domain.tdl domain.tdl soa| grep -q 2012113005; then beep; fi
sleep 2;
done

beep is available in the beep package.

Kumar
-- 
/*
 * Oops. The kernel tried to access some bad page. We'll have to
 * terminate things with extreme prejudice.
*/
die_if_kernel("Oops", regs, error_code);
(From linux/arch/i386/mm/fault.c)				


Reply to: