<commit_before>#!/usr/bin/env bash
# Tested on CentOS (Netsniff-NG fails build because lack of TPACKET_V3, a problem with EL systems)

DESIRED_TOOLKIT_VERSION="$1" # e.g. ./install_netsniff-ng.sh "0.5.9-rc2+"
DIR=/root
HOST=$(hostname -s)
IRCSAY=/usr/local/bin/ircsay
COWSAY=$(which cowsay 2>/dev/null)
LOGFILE=netsniff-ng-install.log

exec > >(tee -a "$LOGFILE") 2>&1
echo -e "\n --> Logging stdout & stderr to $LOGFILE"

function die {
    if [ -f ${COWSAY:-none} ]; then
	$COWSAY -d "$*"
    else
    	echo "$*"
    fi
    if [ -f $IRCSAY ]; then
    	( set +e; $IRCSAY "#company-channel" "$*" 2>/dev/null || true )
    fi
    # echo "$*" | mail -s "Netsniff-NG install information on $HOST" <EMAIL>
    exit 1
}

function hi {
    if [ -f ${COWSAY:-none} ]; then
	$COWSAY "$*"
    else
    	echo "$*"
    fi
    if [ -f $IRCSAY ]; then<commit_msg>install_netsniff-ng.sh: add notes in comments<commit_after>#!/usr/bin/env bash
# Tested on CentOS (Netsniff-NG and Astraceroute fail to build because lack of TPACKET_V3, a problem with EL systems)
# Installs: ifpps trafgen bpfc flowtop mausezahn
DESIRED_TOOLKIT_VERSION="$1" # e.g. ./install_netsniff-ng.sh "0.5.9-rc2+"
DIR=/root
HOST=$(hostname -s)
IRCSAY=/usr/local/bin/ircsay
COWSAY=$(which cowsay 2>/dev/null)
LOGFILE=netsniff-ng-install.log

exec > >(tee -a "$LOGFILE") 2>&1
echo -e "\n --> Logging stdout & stderr to $LOGFILE"

function die {
    if [ -f ${COWSAY:-none} ]; then
	$COWSAY -d "$*"
    else
    	echo "$*"
    fi
    if [ -f $IRCSAY ]; then
    	( set +e; $IRCSAY "#company-channel" "$*" 2>/dev/null || true )
    fi
    # echo "$*" | mail -s "Netsniff-NG install information on $HOST" <EMAIL>
    exit 1
}

function hi {
    if [ -f ${COWSAY:-none} ]; then
	$COWSAY "$*"
    else
    	echo "$*"
    fi
    if [ -f $IRCSAY ]; then
{'fraction_non_alphanumeric': 0.17268184342032206, 'fraction_numerical': 0.012215435868961688, 'mean_word_length': 2.9344978165938866, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2188600', 'n_tokens_mistral': 749, 'n_tokens_neox': 743, 'n_words': 190}