E
E
Everal2018-11-21 20:44:46
bash
Everal, 2018-11-21 20:44:46

Tail + grep + uniq how to combine?

How to force in a stream to deduce the data? Everything is done by a single command

grep "unix:/tmp/php-fpm.sock" access.log | cut -d ' ' -f 1 | sort | uniq -c | sort -n

and tail -f doesn't work
tail -f  access.log | grep --line-buffered "unix:/tmp/php-fpm.sock" | cut -d ' ' -f 1 | sort | uniq -c | sort

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2018-11-21
@Everal

how do you want sort to work until you run out of output?
run through watch -n 1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question