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

if [ -z "${1}" ]; then
sudo dmesg --facility=kern -c |grep -e 'usb 1' |grep Product: |awk '{for(i=6;i<NF;i++)printf "%s",$i OFS; if (NF) printf "%s",$NF; printf ORS}'
# dmesg --facility=kern |grep -e 'usb 1' |grep Product: |awk '{for(i=6;i<NF;i++)printf "%s",$i OFS; if (NF) printf "%s",$NF; printf ORS}'
else
/usr/bin/ideviceinfo -x -s -u ${1} > xml/${1}.xml
fi<commit_msg>- Separated iDevices from regular devices (by passing args) - Write xml file if iDevice present - Only output if usb device recently added (hacked via usb greppEage read: breakeage)<commit_after>#!/usr/bin/env bash

usb_product=`dmesg --facility=kern |grep -e 'usb 1' |grep Product: |awk '{for(i=6;i<NF;i++)printf "%s",$i OFS; if (NF) printf "%s",$NF; printf ORS}'`

if [ -n "${usb_product}" ]; then
	echo -n "Product: "
	dmesg --facility=kern |grep -e 'usb 1' |grep Product: |awk '{for(i=6;i<NF;i++)printf "%s",$i OFS; if (NF) printf "%s",$NF; printf ORS}'
	echo -n "Manufacturer: "
	dmesg --facility=kern |grep -e 'usb 1' |grep Manufacturer: |awk '{for(i=6;i<NF;i++)printf "%s",$i OFS; if (NF) printf "%s",$NF; printf ORS}'
	sudo dmesg --facility=kern -c |grep -e 'usb 1' |grep idVendor |awk '{for(i=8;i<NF;i++)printf "%s",$i OFS; if (NF) printf "%s",$NF; printf ORS}'
fi


if [ -n "${1}" ]; then
	/usr/bin/ideviceinfo -x -s -u ${1} > xml/${1}.xml
fi
{'fraction_non_alphanumeric': 0.2276064610866373, 'fraction_numerical': 0.013215859030837005, 'mean_word_length': 4.452, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, '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': '6554622', 'n_tokens_mistral': 596, 'n_tokens_neox': 581, 'n_words': 176}