Tom Lane wrote:
As for the language choice, my first thought is +1 for perl over shell, mainly because it might be directly useful to people on Windows while shell never would be. On the other hand, if it's possible to do a useful one-liner in shell then let's do it that way.
I don't think it is, reasonably. But here is fairly minimal version that might suit the docs:
use strict; my ($dir, $num) = @ARGV; foreach my $file (glob("$dir/*")) { my $name = basename($file); unlink $file if (-f $file && $name =~ /^[0-9A-Z]{24}$/ && $name lt $num); }
cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers