4

need a script to continuously monitor appended data to a log file

view full story
linux-howto

http://www.linuxquestions.org – Hello, I need some help with the following script: Code: if ! [ -f ${PATH}/myfile.txt ];then   echo $(date +%Y%m%d"_"%H%M%S)": Nu am gasit fisierul ${PATH}/myfile.txt"   ps -fxu pin | grep "/usr/local/coreutils/bin/tail -f ${LOG_PATH}/x.log$" | awk '{system("kill "$2)}'   cat ${LOG_PATH}/x.log | sed -n -e '/LONG/{x;1!p;g;;}' -e h > ${PATH}/myfile.txt     /usr/local/coreutils/bin/tail -f ${LOG_PATH}/x.log | sed -n -e '/LONG/{x;1!p;g;;}' -e h >> ${PATH}/myfile.txt & fi date1=$(tail -1 ${PATH}/myfile.txt | cut -d (HowTos)