head     1.1;
branch   1.1.1;
access   ;
symbols  start:1.1.1.1 webdox:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2003.03.15.00.57.44;  author redpain;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2003.03.15.00.57.44;  author redpain;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#! /usr/bin/perl

# Find the number of 512-byte sectors needed to store
# given file.

# $Revision: 1.1 $

use strict qw(refs vars);

if ( scalar(@@ARGV) != 1 ) {
    print STDERR "Usage: numsecs <filename>\n";
    exit 1;
}

my $filename = shift @@ARGV;
my $size = (-s $filename );
die "Couldn't get size of $filename: $!" if ( !defined $size );

my $result = int($size / 512);
my $remainder = $size % 512;
$result++ if ( $remainder > 0 );

print "$result\n";
@


1.1.1.1
log
@Project Start
@
text
@@
