I have a number of image files that have duplicates across case (ie file.jpg File.jpg).  I need a script like the following except I want to completely remove all uppercase.  I know that fslint can do this, but I want to do it in terminal because there are so many..find . -maxdepth 1 -print0 | sort -z | uniq -dizcase-insensitive search of duplicate file-names
Find case duplicate files and rm uppercase
shell script;terminal;rm;duplicate
The following script may do what you want (I have it set to echo what it would do, rather than actually do it, so you can see)#!/bin/bash# This variable will always be in lower case.  That means that if you do# l=Hello the result will be $l==hello.typeset -l lfor f in *do  l=$f # Forces to lowercase due to typeset  if [ $l != $f -a -e $l ]  then    echo rm $f  fidoneSo, for example:$ lsFIle.JpG  File.jpg  file.jpg$ rem_case_dup.sh rm FIle.JpGrm File.jpg