[wplug] case utility
James O'Kane
jo2y at midnightlinux.com
Mon Apr 4 16:59:29 EDT 2005
On Mon, 4 Apr 2005, Teodorski, Christopher wrote:
> The question is: Is there a good way to grab a filename from a
> directory -- and match it regardless of case within all files in the
> directory and if a match is found replace it with the proper case.
My first attempt at this would be a cross between bash and perl.
I haven't tested it. Change .jpg and .html as needed.
for x in *.jpg
do
perl -pi.bak -e "s/$x/$x/i" *.html
done
-james
More information about the wplug
mailing list