#!/usr/bin/perl # Like cookiecutter(), but cuts file1 [ file2 file3 ... ] down to size in place # (using a temporary copy). # # Technically this command should somehow lock madr to ensure it has exclusive # access until it is done. use DRAORed; use Getopt::Std; $use = q { Use: cookiemonster (-s size) file1 [ file2 file3 ... ] Cuts file1 [ file2 file3 ... ] down to size. size defaults to 512. No check is made for whether size is greater than the original image! }; getopt("s:"); $size = $opt_s || 512; unless(@ARGV > 0) { die $use; } foreach my $filn (@ARGV) { &cookiemonster($size, $filn); }