almost awk only solution

This commit is contained in:
2024-06-10 18:32:21 +02:00
parent c24a72ec6e
commit c56446ad65

View File

@@ -37,4 +37,5 @@ sed 's/^(#|$|\s+#.*)//g' /etc/profile > profile
## Sed
```bash
history | awk '{print $4}' | sort | uniq -c | sort -n
history | awk '{cmd[$4]++};END{ for (ptr in cmd) print ptr, cmd[ptr] }' | sort -k2 -n
```