<commit_before>#!/bin/bash
clear
echo "################################################"
echo "## Script: setup_diskMonitoring.sh"
echo "## By: <NAME>"
echo "## Date: 11/07/14"
echo "################################################"

shopt -s nocasematch
echo -e "\nThis script will place a script called disk_usage.sh in cron.daily"
echo "that will send an email when any disk in the system exceeds 90% usage."
echo "Would you like to continue? (y/n)>"
read answer
case "$answer" in
y|yes )
	echo "Enter the email address to report disk usage to. >"
	read email
	
	echo "
	#!/bin/bash
	
	NOTIFYEMAIL="$email"
	df -H | awk '/\/var\/www/{print $5 \" \" $1 }' | while read output;
	do
		echo \$output
		usep=\$(echo $output | awk '{print \$1}' | cut -d'%' -f1 )
		partition=\$(echo \$output | awk '{print \$2 }' )
		if [[ \$usep -ge 90 ]]; then
			echo \"Running out of space \\\"\$partition (\$usep%)\\\" on \$(hostname) as of \$(date)\" | mail -s \"Alert: Almost out of disk space \$usep%\" \$NOTIFYEMAIL
		fi
	done" > /etc/cron.daily/disk_usage.sh
	chmod +x /etc/cron.daily/disk_usage.sh
	echo "/etc/cron.daily/disk_usage.sh file created"
	;;
* )
	echo "Exiting without changes..."
	;;
esac
shopt -u nocasematch<commit_msg>Uploaded correct version of disk monitoring script<commit_after>#!/bin/bash
clear
echo "################################################"
echo "## Script: setup_diskMonitoring.sh"
echo "## By: <NAME>"
echo "## Date: 11/07/14"
echo "################################################"

shopt -s nocasematch
echo -e "\nThis script will place a script called disk_usage.sh in cron.daily"
echo "that will send an email when any disk in the system exceeds 90% usage."
echo "Would you like to continue? (y/n)>"
read answer
case "$answer" in
y|yes )
	echo "Enter the email address to report disk usage to. >"
	read email
	
	echo "#!/bin/bash
	
NOTIFYEMAIL="$email"
full_drives=\$(df -h | awk '//{if((\$5!~/Use/)&&(substr(\$5,0,length(\$5)) > 90)){print \"WARNING! Partition \"\$6\" is at \"\$5\" usage.\"}}')
if [[ \$full_drives ]]; then
	echo \"\$full_drives\" | mail -s \"Alert: Almost out of disk space on \$HOSTNAME\" \$NOTIFYEMAIL
fi
	" > /etc/cron.daily/disk_usage.sh
	chmod +x /etc/cron.daily/disk_usage.sh
	echo "/etc/cron.daily/disk_usage.sh file created"
	;;
* )
	echo "Exiting without changes..."
	;;
esac
shopt -u nocasematch
#!/bin/bash
{'fraction_non_alphanumeric': 0.24450084602368866, 'fraction_numerical': 0.01311336717428088, 'mean_word_length': 3.8562628336755647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '4518232', 'n_tokens_mistral': 881, 'n_tokens_neox': 800, 'n_words': 263}