<commit_before>#!/bin/bash
export LANG=C LC_ALL=C
set -xue
set -o pipefail

[ -n "$1" ]
prefix="$1"
index="${2:-0}"

find data -name "$prefix-*" | sort -r | head -n "$((index+2))" | tail -n 2 |\
  xargs -n 2 bash -c 'diff -u <(sort "$1") <(sort "$0")' |\
  grep -E '^[-+]' | grep -vE '^[-+]{3}'<commit_msg>diffdata: Add some find options not to search into subdirectories<commit_after>#!/bin/bash
export LANG=C LC_ALL=C
set -xue
set -o pipefail

[ -n "$1" ]
prefix="$1"
index="${2:-0}"

find data -mindepth 1 -maxdepth 1 -name "$prefix-*" | sort -r | head -n "$((index+2))" | tail -n 2 |\
  xargs -n 2 bash -c 'diff -u <(sort "$1") <(sort "$0")' |\
  grep -E '^[-+]' | grep -vE '^[-+]{3}'
{'fraction_non_alphanumeric': 0.26308139534883723, 'fraction_numerical': 0.03197674418604651, 'mean_word_length': 3.1506024096385543, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, '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': '5577039', 'n_tokens_mistral': 316, 'n_tokens_neox': 298, 'n_words': 94}