On 9/2/05, John W. Krahn <[EMAIL PROTECTED]> wrote:
> Jason Ross wrote:
> >
> > I'm trying it on a second drive however, and am getting results that
> > don't look right ...
> >
> The problem is that you are including the data from partition 2. If you
> exclude it then you will get the correct
Jason Ross wrote:
>
> I'm trying it on a second drive however, and am getting results that
> don't look right ...
>
> That drive has the following partitions defined:
>
> * First Sector Last
> * Partition Tag FlagsSector Count Sect
Jason Ross wrote:
Anyway, the issue I have is that I need to determine where there are
gaps between the first sector and last sector (on the entire disk, not
on a given partition).
So, for example, using the sample data below, I want to return "2097415
- 69078878" as available sectors.
Hi J
heh. i didn't realize i sucked this bad =)
On 9/1/05, John W. Krahn <[EMAIL PROTECTED]> wrote:
> > Anyway, the issue I have is that I need to determine where there are
> > gaps between the first sector and last sector (on the entire disk, not
> > on a given partition).
>
> How do you determine wh
Jason Ross wrote:
> Hello.
Hello,
> I'm having a bit of an issue with a script I'm working on. The goal is
> to parse the output of the solaris `prtvtoc` command and do some things
> based on it. I've got that part down, and am placing the bits I care
> about into a hash which is best written (I
Hello.
I'm having a bit of an issue with a script I'm working on. The goal is
to parse the output of the solaris `prtvtoc` command and do some things
based on it. I've got that part down, and am placing the bits I care
about into a hash which is best written (I think ... ) as :
$partition
my @fileNames = (".","..",1,2,3,4,5,6,7,8,9); #assuming that's what the
readdir gives.
splice (@fileNames,0,2); #removes the . and ..
foreach(@fileNames){
if (!-e $_){
print "Sending missing for file: $_";
sendMissing($_); pause();
}
}
I'm not sure we can use the !-e (-e test existe
On Friday 16 November 2001 01:36 pm, Etienne Marcotte rambled:
> > for(my $i = 2, my $j = 1; $i <= $last;$i++, $j++) {
> > if ($j ne $fileNames[$i]) {
> > print "Sending missing for file: $fileNames[$i]";
> > &sendMissing($j);
> > &pause;
> > next;
> > }
>
> for(my $i = 2, my $j = 1; $i <= $last;$i++, $j++) {
> if ($j ne $fileNames[$i]) {
> print "Sending missing for file: $fileNames[$i]";
> &sendMissing($j);
> &pause;
> next;
> }
You never close the opening bracket in the if statement.
and your for is not
I've rewritten the algorithm, but it still is not working correctly. Files 1,
2, 3, 4, 5 are all present, 6 and 7 are missing and 8 is present.
When it gets to the first missing file (6) it skips right over 6 and 7
without running the code in the if statement, but then runs the if statement
co
> -Original Message-
> From: Etienne Marcotte [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 08, 2001 2:24 PM
> Cc: 'Michael D. Risser'; [EMAIL PROTECTED]
> Subject: Re: Comparison problem
>
>
> In my previous post I used -f for missing file, bu
lto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 08, 2001 11:01 AM
> > To: [EMAIL PROTECTED]
> > Subject: Comparison problem
> >
> >
> > I have a script which in part takes a list of files in a
> > directory (the name
> > of each file is a numb
oops it's -f
and after reading Bob's reply you need to remove . and ..
so:
print "Number of files to process:" $#fileNames-1; # maybe with
dots between the parts
print "\n Press any key to continue, Ctrl-C to exit\n";
chomp(my $in=);
for(0..$#fileNames-2) {
if (-f) {
> -Original Message-
> From: Michael D. Risser [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 08, 2001 11:01 AM
> To: [EMAIL PROTECTED]
> Subject: Comparison problem
>
>
> I have a script which in part takes a list of files in a
> directory (the name
#|--Remove Before Flight-->
print "Number of files to process:" $#fileNames+1 "\n"; # maybe with
dots between the parts
print "Press any key to continue, Ctrl-C to exit\n";
chomp(my $in=);
#<--Remove Before Flight--|
# Go through each file we found
for(0..$#fileNames) {
if (-e $
I have a script which in part takes a list of files in a directory (the name
of each file is a number), sorts them numerically, and then runs through each
file checking to see if any are missing, and performing a set action if it is
missing, or a different action if it is present.
My problem i
16 matches
Mail list logo