/ Published in: Bash

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# Find all files (and directories) in the current directory (cwd) which are # 'equivalent' wrt. case. E.g. foo =~ FOO =~ foO ... shopt -s nocasematch; unset a for f in *; do for e in "${a[@]}"; do if [[ "$f" == "$e" ]]; then echo "'$f' equivalent to '$e'" # break out and continue with next file continue 2 fi done # file is not yet in array -> add it a+=($f) done
Comments
