Skip to content

Instantly share code, notes, and snippets.

@othmane-kinane-nw
othmane-kinane-nw / detect-case-sensitivity-issues-in-paths.sh
Last active August 29, 2024 19:51
Detect file and directory paths in a git repo that differ only by case
#!/bin/bash
set -e
shopt -s expand_aliases
XARGS_MAX_CMD_LENGTH=`echo | xargs --show-limits 2>&1 | awk '/POSIX upper limit on argument length/ {print $NF}'`
echo "Checking paths under '$PWD' for case related problems..."
alias sort_case_insensitive='sort -f'
alias uniq_show_grouped_duplicates='uniq -i --all-repeated=separate'