💾 Archived View for hajime.4teri.de › dotfiles › file › scripts › usagecount.sh.gmi captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
usagecount.sh - dotfiles - Collection of my dotfiles
---
usagecount.sh (314B)
---
1 #! /bin/sh
2
3 usage()
4 {
5 if ! [ -z "$1" ]
6 then
7 echo "$(grep "$prog" < /home/zocki/.zsh_history | cut -d ';' -f2 | grep -c -E "^$prog")"
8 else
9 echo "$(grep "doas" < /home/zocki/.zsh_history | cut -d ';' -f2 | grep -c -E "^doas")"
10 fi
11 }
12
13 prog="$1"
14
15 count=$(usage "$prog")
16 echo "Usage of $prog is $count time(s)."
generated w/ stagit-gemini