home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCNET 2006 September - Disc 1
/
PCNET_CD_2006_09.iso
/
linux
/
puppy-barebones-2.01r2.iso
/
pup_201.sfs
/
usr
/
sbin
/
pmonitork.sh
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Linux/UNIX/POSIX Shell Script
|
2004-02-12
|
384 b
|
17 lines
#!/bin/sh
# log a file tail
#Xdialog --title "Monitoring tail of $1" --smooth --fixed-font --no-cancel --ok-label "Exit" --tailbox $1 18 95
LINES1=0
LINES2=0
while [ 1 ];do
LINES2=`wc -l /var/log/messages | tr -s " " | cut -f 2 -d " "`
if [ $LINES2 -gt $LINES1 ];then
LINESDIFF=`expr $LINES2 - $LINES1`
tail -n $LINESDIFF /var/log/messages
LINES1=$LINES2
fi
sleep 1
done