<commit_before>#!/usr/bin/env bash


passwd_file=`mktemp`

# getpwent returns duplicate entries for root and nobody users
# due to a bug in systemd-userdb.service that occurs
# in systemd 245
# https://github.com/systemd/systemd/issues/15160
if which systemctl &>/dev/null && \
		[[ `systemctl --version | grep "systemd 245"` =~ "245" ]] ; then
	grep -Ev '^(root|nobody)' /etc/passwd > "$passwd_file"
else
	cp /etc/passwd "$passwd_file"
fi

LINES_COUNT=`cat "$passwd_file" | wc -l`

function getField {
    LINE=`sed -n "${I}p" "$passwd_file"`
    case $1 in 
	'username' )
	    echo $LINE | awk -F':' '{print $1}'
	    ;;
	'password' )
	    echo $LINE | awk -F':' '{print $2}'
	    ;;
	'user_id' )
	    echo $LINE | awk -F':' '{print $3}'
	    ;;
	'group_id' )
	    echo $LINE | awk -F':' '{print $4}'
	    ;;
	'gcos' )
	    echo $LINE | awk -F':' '{print $5}'
	    ;;
	'home_dir' )
	    echo $LINE | awk -F':' '{print $6}'
	    ;;
	'login_shell' )
	    echo $LINE | awk -F':' '{print $7}'
	    ;;
    esac
}<commit_msg>Fix test for password probe<commit_after>#!/usr/bin/env bash


passwd_file=`mktemp`

# getpwent returns duplicate entries for root and nobody users
# due to a bug in systemd-userdb.service that occurs
# in systemd 245
# https://github.com/systemd/systemd/issues/15160
if which systemctl &>/dev/null && \
		[[ `systemctl --version | grep "systemd 245"` =~ "245" ]] ; then
	grep -Ev '^(root|nobody)' /etc/passwd > "$passwd_file"
else
	cp /etc/passwd "$passwd_file"
fi

LINES_COUNT=`cat "$passwd_file" | wc -l`

function getField {
    LINE=`sed -n "${I}p" "$passwd_file"`
    case $1 in 
	'username' )
	    echo $LINE | awk -F':' '{print $1}'
	    ;;
	'password' )
	    echo $LINE | awk -F':' '{print $2}'
	    ;;
	'user_id' )
	    echo $LINE | awk -F':' '{print $3}'
	    ;;
	'group_id' )
	    echo $LINE | awk -F':' '{print $4}'
	    ;;
	'gcos' )
	    echo $LINE | awk -F':' '{gsub(/&/,"&amp;",$5); print $5}'
	    ;;
	'home_dir' )
	    echo $LINE | awk -F':' '{print $6}'
	    ;;
	'login_shell' )
	    echo $LINE | awk -F':' '{print $7}'
	    ;;
    esac
}
{'fraction_non_alphanumeric': 0.19971126082771895, 'fraction_numerical': 0.02165543792107796, 'mean_word_length': 2.752707581227437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '523401', 'n_tokens_mistral': 904, 'n_tokens_neox': 800, 'n_words': 221}