Hi Everyone ,
I am facing a strange problem
i have made the follwing script to watch a appending log file (abc.log) but its not moving after the line tail -f ,
any suggestions
=====================================
#!/bin/bash
while true
do
tail -f abc.log | grep "exceptions"
echo hi
done
===================================
but the script keeps on giving the exceptions output as follows:
exception.TaxStrategyException: Error during port.getTax
exception.InterfaceException: Error MNP duplicate found
exception.CardPaymentException: Payment gateway rejected
and i want the out put to be as follows :------
exception.TaxStrategyException: Error during port.getTax
hi
exception.InterfaceException: Error MNP duplicate found
hi
exception.CardPaymentException: Payment gateway rejected
hi
================================================
the basic problem i have seen is that tail -f keeps on checking the appending log file due to which it doesnot ends up and the second command
echo hi never gets executed.
Please help me if there is any other way of doing this
Thanks