#!/usr/bin/perl
use strict;
use Getopt::Long;
my (%opt);
Getopt::Long::Configure ("bundling");
if (GetOptions(\%opt,
'digits=i',
'help|usage|?',
'quiet',
'reverse',
'separator=s',
'test|n',
'verbose',
'zero|0'))
{
####
babylon5:alaric:/minbar/camera/canon/test:39 $ renum -t foo img*
Unknown option: t
##
##
babylon5:alaric:~:1 $ renum -t -d 4 foo bar*
Test mode: No changes will be committed
Trying pattern: bar\*
Using format foo-%04d.jpg
No files found; doing nothing
##
##
babylon5:alaric:~:2 $ renum -t -d 4 -r foo bar*
Unknown option: t
Unknown option: d
Unknown option: r
Usage: renum [options] pattern files
Options:
-d digits Use digits in ordinal field
-zero, -0 Begin numbering from 0 (default 1)
-quiet Quiet (no progress messages)
-reverse Reverse order
-separator Use as separator character (default '-')
-test, -n Do not make any actual changes
All options may be abbreviated.
##
##
Without additional configuration, GetOptions() will ignore
the case of option names, and allow the options to be
abbreviated to uniqueness.