2 ################################################################################
6 # Description: This script will locate a vob by searching through the various
8 # Author: Andrew@DeFaria.com
9 # Created: Mon May 3 09:06:55 PDT 2004
10 # Modified: 2007/05/17 07:45:48
13 # (c) Copyright 2004, Andrew@DeFaria.com, all rights reserved.
15 ################################################################################
20 use lib "$FindBin::Bin/../lib";
25 display "Usage $FindBin::Script: [ <vob tag>... | -u ]";
27 display "\t<vob tag>\tName of the vob to find (can be partial name)";
37 # Get a list of regions
38 my @regions = `cleartool lsregion`;
42 foreach $region (@regions) {
44 chop $region if $region =~ /\r/; # Remove carriage returns
46 # Get a list of vovs in the region
47 my @lines = `cleartool lsvob -region $region`;
49 # Parse the lines extracting vob tag and storage area
51 if (/[\* ]\s*(\S*)\s*\S*/) {
54 if ($name =~ /$vob/i) {
55 display "\t$name ($region)";
67 if (defined $ARGV [0] and $ARGV [0] =~ /^-u/) {
72 verbose "Searching for vobs containing \"$_\"\n";
73 my $nbr_vobs = SearchRegions $_;
76 display "No vobs found"
77 } elsif ($nbr_vobs eq 1) {
78 display "1 vob found";
80 display "$nbr_vobs vobs found";
83 verbose " matching \"$_\"\n";