You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
misc/shell_scripts/social_behavior_distribution

20 lines
669 B

#! /usr/bin/env bash
# http://fabien.benetou.fr/Tools/Irssi#LogsSocialBehaviors
if [ $# -lt 1 ]
then
echo "usage: $0 pattern [network] [user]" ; exit;
fi
#save params in ~/$0_history
# history | grep social_behavior_distribution
## cheaper version
PERSON=$1;
BEHAVIOR_PATTERN=$2;
FRESHNESS=-20000;
tail $FRESHNESS ~/irclogs/seedeabitlbee/$PERSON.log | grep -i "$BEHAVIOR_PATTERN" | grep -i $PERSON | sed "s/:.*//" | sort -n | uniq -c | sort -n -r | head -3
# note that seedeabitlbee is now fabien
# note that comparison can't be done because freshness changes per person
# i.e. the more you talk with a person, the fresher the information will be, and vice versa