Pat Gunn (dachte) wrote,
Pat Gunn

Latest Concoction

Before I start, take a look at this interesting review of GIMPversus Photoshop. As GIMP is free, and Photoshop is $650, if you ever need to edit an image,you should have GIMP. It's available for Windows and MacOS too. Check this out too.

Ok, here's my latest concoction..Call it transrename.

  1. !/usr/bin/perl -w
if(! @ARGV > 2)
{die "Usage: transrename pattern files...\n";}
my @argvc = @ARGV; # Some platforms can't shift @ARGVmy $code = shift(@argvc);print "\n";foreach (@argvc)
my $old = $_;
eval $code;
print " $old => $_\n";
if($old ne $_)
system("/bin/mv", '-i', $old, $_);

It's just a short script to rename things. I wrote it for somethingat work, but it's also useful for home purposes -- when handling peoplewho use other standards for naming music files than I do, I typicallyinvoke it as such:transrename 's/ - /-/g;tr/A-Z/a-z/;s/ /_/;'

In other technology uses, the possibilities in this areastounding.

I'll be putting up some new pictures in my gallery soon.

(section not shown)
Back to work!

Tags: tech

  • Still alive

    Been feeling a bit nostalgic. Not about to return to LiveJournal - their new ownership is unfortunate, but I wanted to briefly note what's been up…

  • Unplugging LJ

    It's about time I pulled the plug on the LJ version of my blog: 1) I'm much more active on G+ than I am with general blogging. I post many times a…

  • Mutual Trust

    I don't know which should be considered more remarkable: That a cat should trust a member of a far larger and stronger species that it can't…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded