Add function for linguistic analysis.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 15 Oct 2016 01:41:37 +0300
changeset 811 b41cb471a3d0
parent 810 a218876105c7
child 812 1f6f7d99f655
Add function for linguistic analysis.
.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}'
+}