tail -f helping
by dr.x from LinuxQuestions.org on (#4RX0V)
tail -f /var/log/messages/*-sockd.log | grep --line-buffered google | awk '{print $1,$6,$12,$17}'
05/Oct/2019:17:18:57 23.60.15.126 jan 515607
05/Oct/2019:17:18:57 2.147.234.142 minh 3342
05/Oct/2019:17:18:57 2.147.235.85 minh 442
05/Oct/2019:17:18:57 2.147.11.102 minh 333
but i want to count the last variable ,
i tried
tail -f /var/log/messages/*-sockd.log | grep --line-buffered google | awk '{print $1,$6,$12,$17}' | wc -m $17
but it fail , how can i count the digits in the output of the $17 variable ?
Thanks


05/Oct/2019:17:18:57 23.60.15.126 jan 515607
05/Oct/2019:17:18:57 2.147.234.142 minh 3342
05/Oct/2019:17:18:57 2.147.235.85 minh 442
05/Oct/2019:17:18:57 2.147.11.102 minh 333
but i want to count the last variable ,
i tried
tail -f /var/log/messages/*-sockd.log | grep --line-buffered google | awk '{print $1,$6,$12,$17}' | wc -m $17
but it fail , how can i count the digits in the output of the $17 variable ?
Thanks