Changeset fc8707b for client/bin/gbrm
- Timestamp:
- Oct 2, 2010, 9:20:02 PM (15 years ago)
- Branches:
- master, debian, mac, no-cups
- Children:
- a5cf43b
- Parents:
- 6b7441a
- git-author:
- Jessica B. Hamrick <jhamrick@…> (10/02/10 21:20:02)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (10/02/10 21:20:02)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client/bin/gbrm
r6b7441a rfc8707b 11 11 use Getopt::Long; 12 12 13 my $usage = "Usage: gbq [-q QUEUE] ID\n"; 13 # usage 14 my $usage = <<USAGE; 15 Usage: gbq [options] [-q QUEUE] ID 16 17 -q, --queue Specify a queue other than the default 18 -h, --help Print this message 19 USAGE 20 21 # initialize the variables for the options 14 22 my $q = ""; 15 GetOptions ('q|queue=s' => \$q); 23 my $help = 0; 24 25 # parse the options 26 GetOptions ('q|queue=s' => \$q, 27 'h|help', => \$help); 28 29 # if the -h flag was passed, then print the usage and exit 30 if ($help) { 31 print $usage; 32 exit 0; 33 } 16 34 17 35 my @ids = @ARGV[0 .. $#ARGV]; … … 19 37 # if the -q option is not specified, then assume we're using the 20 38 # default queue 21 if (!$q) {39 if (!$q) { 22 40 $q = "DEFAULT"; 23 41 }
Note: See TracChangeset
for help on using the changeset viewer.