#!/usr/bin/env perl

use warnings;
use strict;
use IPC::Cmd 0.36 qw( can_run run );
use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );

my $start;
my $product;

GetOptions( 
        'start|s=s' => \$start,
        'product|p=s' => \$product,
        )  or pod2usage( 2 );

my $i;

for ($i = $start; $i < 100000; $i++) {

    my $job = sprintf("J%06d", $i);
    my $command  = "dsreg --del $job --product $product";

    run(command => $command, verbose => 1);
}
