# HG changeset patch # User Oleksandr Gavenko # Date 1476484897 -10800 # Node ID b41cb471a3d0107bac4e3e97b2db28c2cf258dae # Parent a218876105c7815f68fc32c96b01e86cece3898c Add function for linguistic analysis. diff -r a218876105c7 -r b41cb471a3d0 .bashrc --- a/.bashrc Thu Sep 29 10:24:43 2016 +0300 +++ b/.bashrc Sat Oct 15 01:41:37 2016 +0300 @@ -223,3 +223,9 @@ echo $day days $hour hours $min minutes $sec seconds } +# For linguistic analysis. +myfreq() { + ag --nofilename -C1 -- "$1" + printf '\n\n\e[31mtotal:\e[0m ' + ag --nofilename --count -- "$1" | awk '{c += $1} END {print c}' +}