I this question... cevap vardı ve çok güzel de oldu. Ama gariplik günlük dosyası eşsiz bir son çizgi, (yani ilk birkaç kelime ödemeler dengesi hatları farklı) doğru tail -n 1 "file"
strong> ile son satırı döndürür varsa bu sayede ortaya çıkmış, fakat eğer son birkaç satır son satırına benzer, benzer tüm satırları döndürür.
Sana göstereyim ....
Bu okuyor dosya ...
frame= 1065 fps= 30 q=1.6 size= 11977kB time=35.54 bitrate=2761.1kbits/s
frame= 1081 fps= 30 q=2.7 size= 12174kB time=36.07 bitrate=2765.0kbits/s
frame= 1097 fps= 30 q=2.7 size= 12332kB time=36.60 bitrate=2759.9kbits/s
frame= 1113 fps= 30 q=3.0 size= 12487kB time=37.14 bitrate=2754.4kbits/s
frame= 1129 fps= 30 q=2.4 size= 12652kB time=37.67 bitrate=2751.3kbits/s
frame= 1145 fps= 30 q=2.4 size= 12824kB time=38.20 bitrate=2749.7kbits/s
frame= 1161 fps= 30 q=2.4 size= 12996kB time=38.74 bitrate=2748.1kbits/s
frame= 1176 fps= 30 q=2.7 size= 13162kB time=39.24 bitrate=2747.8kbits/s
frame= 1191 fps= 30 q=2.6 size= 13328kB time=39.74 bitrate=2747.4kbits/s
frame= 1206 fps= 30 q=2.5 size= 13496kB time=40.24 bitrate=2747.5kbits/s
frame= 1222 fps= 30 q=2.5 size= 13685kB time=40.77 bitrate=2749.6kbits/s
frame= 1240 fps= 30 q=4.2 size= 13954kB time=41.38 bitrate=2762.8kbits/s
frame= 1261 fps= 31 q=4.6 Lsize= 14428kB time=42.08 bitrate=2809.1kbits/s
video:13889kB audio:494kB global headers:0kB muxing overhead 0.314239%
$line = `tail -n 1 "$logfile"`;
RETURNS...
video:13889kB audio:494kB global headers:0kB muxing overhead 0.314239%
Bu son, daha özgün çizgi, yoksa However, ... döndürür: -
frame= 1065 fps= 30 q=1.6 size= 11977kB time=35.54 bitrate=2761.1kbits/s
frame= 1081 fps= 30 q=2.7 size= 12174kB time=36.07 bitrate=2765.0kbits/s
frame= 1097 fps= 30 q=2.7 size= 12332kB time=36.60 bitrate=2759.9kbits/s
frame= 1113 fps= 30 q=3.0 size= 12487kB time=37.14 bitrate=2754.4kbits/s
frame= 1129 fps= 30 q=2.4 size= 12652kB time=37.67 bitrate=2751.3kbits/s
frame= 1145 fps= 30 q=2.4 size= 12824kB time=38.20 bitrate=2749.7kbits/s
frame= 1161 fps= 30 q=2.4 size= 12996kB time=38.74 bitrate=2748.1kbits/s
frame= 1176 fps= 30 q=2.7 size= 13162kB time=39.24 bitrate=2747.8kbits/s
frame= 1191 fps= 30 q=2.6 size= 13328kB time=39.74 bitrate=2747.4kbits/s
frame= 1206 fps= 30 q=2.5 size= 13496kB time=40.24 bitrate=2747.5kbits/s
frame= 1222 fps= 30 q=2.5 size= 13685kB time=40.77 bitrate=2749.6kbits/s
frame= 1240 fps= 30 q=4.2 size= 13954kB time=41.38 bitrate=2762.8kbits/s
frame= 1261 fps= 31 q=4.6 Lsize= 14428kB time=42.08 bitrate=2809.1kbits/s