x

Programs, configuration and documentation that don't fit anywhere else
Log | Files | Refs | README | LICENSE

commit 716652ba7d73c1c5a4fe630ea5ed85e55bc49e5e
parent 2be581dc8e5b16051be5d7687ee0a5c0306cd59e
Author: Oliver Lowe <o@olowe.co>
Date:   Thu, 15 Jun 2023 13:51:02 +1000

hits: correct sort example usage

We want to use the -n flag because we're sorting numbers

Diffstat:
Mman/hits.1 | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/man/hits.1 b/man/hits.1 @@ -27,19 +27,19 @@ Here is an example line: Print the most-requested paths from the latest access log: .Bd -literal -offset indent -hits /var/www/logs/access.log | sort | tail +hits /var/www/logs/access.log | sort -n | tail .Ed .Pp Print the least-requested blog entries from 2021: .Bd -literal -offset indent -grep 'blog/2021/' /var/www/logs/access.log | hits | sort | sed 10q +grep 'blog/2021/' /var/www/logs/access.log | hits | sort -n | sed 10q .Ed .Pp Print the 20 most-requested paths from all access logs: .Bd -literal -offset indent cd /var/www/logs -gunzip -c access*.gz | cat access.log | hits | sort -r | sed 20q +gunzip -c access*.gz | cat access.log | hits | sort -nr | sed 20q .Ed .Sh SEE ALSO .Xr awk 1