New tool: sednames
What if you could use sed to rename files?
Well, now you can.
sednames is a utility that lets you specify a program for sed on the command-line, which it then uses to rename the files that you also specify on the command-line.
The twist is that, unlike other batch-renamers, sednames also supports your VCS. For the most common cases (svn, hg, bzr, and git), there’s a –vcs option:
% sednames -e 's/Replace/Mix/' --vcs=hg *
This command-line will use Mercurial (hg mv) to rename every file by replacing “Replace” with “Mix”. Of course, if a name doesn’t contain “Replace”, then that name will be unchanged and sednames is smart enough to not try to rename that file.
Not only that, but just in case you’re using some oddball VCS (or you want to copy instead of rename, or something), sednames supports using any program to rename your files, as long as it accepts both the before and after names in its arguments. The –help output is more specific, but to put it simply, it works similarly to find‘s -exec option.
You can download the current revision directly, or use the Mercurial repository to follow or contribute to its development.
June 29th, 2008 at 18:05:58
I don’t know why, but this post keeps reappearing in my feed. Over and over again.
I think there are minor edits being made to it, but I don’t know that you are necessarily intending for it to repeatedly appear in the feed.
June 29th, 2008 at 18:34:50
Matthew Schinckel: I haven’t edited it in a week or so. Try unsubscribing and resubscribing, or clearing out your feed reader’s folder in Library/Caches.
July 6th, 2008 at 06:37:31
Strange – I’ve done that (a couple of times), and this post, as well as only two others, (WWDC Survival Guide, and the Keyboard one) keep reappearing the newly updated feeds list.
No biggie. Unless it is happening for other people.
July 6th, 2008 at 11:47:35
“No biggie. Unless it is happening for other people.”
It is. Netnewswire shows the quotation marks changing each time.
September 9th, 2008 at 12:43:10
That actually happens to me a lot with this RSS feed (and no others, out of about 140) for some reason. I’m also using NNW.
Hmm, the quotes are using raw 8-bit characters and that may (obviously) be causing problems if the encoding is not set correctly. They show up correctly in Safari, but as ??? in NNW at the moment. I can’t imagine why that should cause the feed to be marked unread, though.
But I’m not writing solely to kvetch, no! I will share a marginally relevant tidbit. The Unix Haters Handbook has a great quote from Jamie Zawinski on sed:
September 9th, 2008 at 13:06:14
The Atom feed says:
The RSS feed serves up a redirection (Moved Permanently) whose HTML depiction says:
The destination of that redirection is FeedBurner, which says:
So, make sure you’re subscribed directly to the FeedBurner URL, and it should definitely work.
September 10th, 2008 at 05:56:34
I’m subscribed directly to feedburner. Here’s what I see (via curl). Note last-modified date.
I’ll switch to Atom, in any case.
September 10th, 2008 at 08:02:43
The Last-Modified date is probably because FeedBurner shows the number of comments on the feed. This post is in the last ten, so it’s still in the feed (I forgot what I set the number to, but it’s at least ten). So, every comment on this post bumps the feed.
Getting back to the encoding problem: I just tried the FeedBurner feed in NetNewsWire 3.1 and it works fine. The quote marks in this post show up as quote marks.