Changeset 335786f


Ignore:
Timestamp:
Aug 14, 2010, 3:16:14 PM (14 years ago)
Author:
Kyle Brogle <broglek@…>
Branches:
master, debian, mac, no-cups
Children:
618236b, 55b24d1
Parents:
79fac02
git-author:
Kyle Brogle <broglek@…> (08/14/10 15:16:14)
git-committer:
Kyle Brogle <broglek@…> (08/14/10 15:16:14)
Message:

[Trac #14] gbrm now accepts regex and multiple filename arguments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client/bin/gbrm

    r9fdf4a1 r335786f  
    1212
    1313my $q = $ARGV[0];
    14 my $id = $ARGV[1];
     14my @ids = @ARGV[1 .. $#ARGV];
    1515
    16 if (!$q or !$id) {
     16if (!$q or !@ids) {
    1717    print $usage;
    1818    exit 1
     
    4242}
    4343my @jobs = $printer->getJobs(0, 0);
    44 
     44foreach my $id(@ids){
    4545if ($id eq "all") {
    4646    foreach $id(@jobs) {
     
    5757}
    5858else {
    59     cancel_job($id, $printer);
     59    foreach my $item(@jobs) {
     60        if($item =~ /$id/){
     61            cancel_job($item, $printer);
     62        }
     63    }
     64}
    6065}
    6166
     
    6772
    6873    print "Canceled job '$title' (id $id)\n";
     74 
    6975}
Note: See TracChangeset for help on using the changeset viewer.