non tested but re-organizing from previously working version

master
Fabien Benetou 13 years ago
parent 0366b4ab4b
commit c961ea41ef
  1. 14
      shell_scripts/logs_own_vocabulary
  2. 12
      shell_scripts/most_used_commands

@ -0,0 +1,14 @@
#! /usr/bin/env bash
# see http://fabien.benetou.fr/innovativ.it/www/HistoricalArchives/Seedea/Oimp/Ubiquitousvocabulary
LOGS=web/thelab/stigmergylive/logs/ChannelLogger/freenode/#*/*
cat $LOGS | grep "<Utopiah" | sed -e "s/[^a-zA-Z]/ /g" | sed -e "s/ /\n/g" | sed -e "s/^.\{1,3\}$//" |sort | uniq
# cleaning by removing low frequency words
# ... | sed -e "s/[^a-zA-Z]/ /g" | sed -e "s/ /\n/g" | sed -e "s/^.\{1,3\}$//" |sort | uniq -c | grep -v " 1" | grep -v " 2" | grep -v " 3" | wc -l
# 10 most commonly used words
# ... | sed -e "s/[^a-zA-Z]/ /g" | sed -e "s/ /\n/g" | sed -e "s/^.\{1,3\}$//" |sort | uniq -c | sort -n | tail -15

@ -1,6 +1,14 @@
#! /usr/bin/env bash
AVOID="con\|utopiah@benetou.fr"
# TODO
# consider similar usage for more than bash
# find ~ -name "*history*"
# ~/.vimperator/info/default/history-command (specific JSON format)
# ~/.newsbeuter/history.cmdline
# code repository per programming language (PHP, Processing, JavaScript, ... and bash too!)
# thought about this earlier to compare with the "signature" vocabulary of expert, notes unfound
echo consider also http://fabien.benetou.fr/Tools/ and to do exercises
# warning, do not miss the environment e.g. http://mywiki.wooledge.org/BashGuide/
@ -8,7 +16,3 @@ cat ~/.bash_history | sed "s/ /\n/g" | grep "^[[:alpha:]]" | sort | uniq -c | gr
# simpler version for just the first word, which is bad for commands like sort which never appear first
#cat ~/.bash_history | sed "s/ .*//" | sort | uniq -c | sort -n | tail
# consider similar usage for more than bash
# find ~ -name "*history*"
# ~/.vimperator/info/default/history-command (specific JSON format)
# ~/.newsbeuter/history.cmdline

Loading…
Cancel
Save