Aaron B. Russell’s personal blog
30 Dec
Jon,
Open a console window, type in pico ~/fnclean.pl, and paste this in:
#!/usr/bin/perl
while (<STDIN>) {
chomp($_);
$oldfilename = $_;
s/_//;
$newfilename = $_;
print "$oldfilename -> $newfilename...";
`mv $oldfilename $newfilename`;
print " done!\n";
}
Then press Control-O, hit enter, then press Control-X to save and quit pico. Then type in chmod 755 ~/fnclean.pl. Then call the program like this: ls /path/to/files/*.jpg | ~/fnclean.pl
The output will look like this:
[nanaki:~] idigital% ls /Users/idigital/*.jpg | ~/fnclean.pl
/Users/idigital/asdfkljhasdfil_73.jpg -> /Users/idigital/asdfkljhasdfil73.jpg… done!
/Users/idigital/foo_3.jpg -> /Users/idigital/foo3.jpg… done!
/Users/idigital/foo_4.jpg -> /Users/idigital/foo4.jpg… done!
/Users/idigital/foo_423.jpg -> /Users/idigital/foo423.jpg… done!
/Users/idigital/foo_42323453.jpg -> /Users/idigital/foo42323453.jpg… done!
/Users/idigital/foo_4234523453.jpg -> /Users/idigital/foo4234523453.jpg… done!
/Users/idigital/foo_4234523459783.jpg -> /Users/idigital/foo4234523459783.jpg… done!
/Users/idigital/foo_42453.jpg -> /Users/idigital/foo42453.jpg… done!
/Users/idigital/foobar_42453.jpg -> /Users/idigital/foobar42453.jpg… done!
[nanaki:~] idigital%
Enjoy.
Aaron.
30 Dec
I was hungry, so I just got
Now to munch it, and then go to bed.
30 Dec
Party yesterday at Jamie’s:
Met up with Cat, Nicky and Jon in Bromley, before meeting up with 239087234908 people in Croydon. Got to Jamie’s, got very drunk, very quickly, on any alcoholic liquid which happened to come my way, Cat got off with some other guy, I jumped through a window, um… yeah, good party :)
28 Dec
New userpic at the request of
28 Dec
Oh yeah, my journal’s now using S2, and has been for a few days now… :D
28 Dec
Haha, cool, I just came across a post in a journal saying this:
“*grins* I just got IM’ed by
I feel very important now.
I almost didn’t answer him, because it showed up as a message from someone named “Aaron,” and I thought it was my evil jerky ex-roommate Aaron, who stole from my house and dealt coke from our house, and lied about it.
I think I might go make myself some Matzoh Brai now.
Have I friended anyone here yet?
Maybe I’ll go friend
28 Dec
http://selphie.noc.dcginternet.co.uk/gallery/christmas2002
(I’m still adding photos to that…)
22 Dec
The Adventures of Paul Ooshen (Say it fast…)
http://www.livejournal.com/talkpost.bml?journal=dilbertdaily&itemid=11383
22 Dec
There’s an important announcement thing over at Minilog.com. Go. Read it. Rawr.
22 Dec
Error running startup hook:
Undefined subroutine &CML::start_request called at (eval 141) line 31.
Recent Comments