GNU bug report logs -
#25475
tail -f behaviour
Previous Next
Reported by: f0rhum <f0rhum <at> free.fr>
Date: Wed, 18 Jan 2017 16:40:02 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 25475 <at> debbugs.gnu.org (full text, mbox):
tail -fn20 -s30 file
...
2017-01-18 22:55:00 10 0V18 +1C 0A00 500mA 11V70 20% 2A30 11861
Date Heure Mes. Vpan. Tmp. Ich. Conso Vbat. SoC Sta
Vin mV
2017-01-18 23:00:01 10 0V17 +1C 0A00 500mA 11V71 19% 2A30 11879
2017-01-18 23:05:00 10 0V17 +0C 0A00 480mA 11V71 20% 2A30 11868
2017-01-18 23:10:00 10 0V18 +0C 0A00 500mA 11V70 19% 2A30 11865
2017-01-18 23:15:00 10 0V16 +0C 0A00 510mA 11V69 19% 2A30 11832
--> Vbat<11V70: Delestage automatique de 9h08mn
2017-01-18 23:20:21 Controleur inaccessible
2017-01-18 23:25:21 Controleur inaccessible
^C
tail -fn20 -s30 file
...
2017-01-18 22:55:00 10 0V18 +0C 0A00 500mA 11V70 20% 2A30 11861
Date Heure Mes. Vpan. Tmp. Ich. Conso Vbat. SoC Sta
Vin mV
2017-01-18 23:00:01 10 0V17 +1C 0A00 500mA 11V71 19% 2A30 11879
2017-01-18 23:05:00 10 0V17 +0C 0A00 480mA 11V71 20% 2A30 11868
2017-01-18 23:10:00 10 0V18 +0C 0A00 500mA 11V70 19% 2A30 11865
2017-01-18 23:15:00 10 0V16 +0C 0A00 510mA 11V69 19% 2A30 11832
--> Vbat<11V70: Delestage automatique de 9h08mn
2017-01-18 23:20:21 Controleur inaccessible
...
2017-01-19 00:10:04 Controleur inaccessible
For the 2 above, I didn't delete any line above. Only the line 23:25:21
in the first was replaced by my script with
...
23:30:xx .... <--- which in turn was updated by a new similar messages
until a different message happens (note here this is an additionnal line)
I didn't have the idea that "file grows" can have 2 meaning : grows in
bytes, or grows in line numbers. Whatever, a new line was added between
iterations (one deleted then immediately 2 added), and 3 bytes added (43
deleted (then sed -i '$ d' $LOGF;), then immediately 3 + 43 printed
immediately in a single write (help of printf "...\n%s Controleur
inaccessible\n" "`date "+%F %X"`" >>$LOGF )
I must also clarify something : this not an issue for me, I just wanted
to share what I discovered.
I just discovered -f was great live help while tracking bugs in my script.
Bye bye
This bug report was last modified 6 years and 268 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.