5
Is there a way to make tail show a line number in front of the last lines it show so that it show the growth of the file when using it in a script.
e.g: when using it in a script like this one:
while [-z $(ps -p $pid) ]; do
echo "process is running"
.....
tail process.logfile
sleep 15
clear
done
out put should be:
111 line 111
112 line 112
113 line 113
114 line 114
115 line 115
....
and the next round it should be:
116 line 116
117 line 117
118 line 118
119 line 119
120 line 120
...
What about using
tail -f
instead? – choroba – 2013-12-19T11:49:46.063