How does one concatenate many files into one?
How does one concatenate many files into one?
am 13.11.2008 08:24:14 von zilore mumba
--===============2075378490==
Content-Type: multipart/alternative; boundary="0-1267140126-1226561054=:91901"
--0-1267140126-1226561054=:91901
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Esteemed Perl users,
I have a perl script below which is meant to perform a couple of tasks, viz=
..,
combine several files into one (marked blue in the code below). I have look=
ed, without success,=A0for the command which does this.
1. Help how do I do this (all files end in H)?
2. I have to run another perl script (grib2ctl.pl), is this how to do it (m=
arked blue in the code below).
3. I have to delete the files ending in H. Is unlink <*H>; the way?
=A0
Assistance will be appreciated.
Zilore
=A0
#
#!/usr/bin/perl -w
#This script processes UKMO model data from RETIM-SYNERGIE and archives it =
on=20
#the ACMAD system. The cycles (or times) are 00 and 12.
#
use strict;
use warnings;
use POSIX;
use File::Path;
use File::Copy;
#
my $ctl_ext=3D".ctl";
my $grib_ext=3D".grib";
#
my $UK_sufx=3D"2";
my $dash=3D"-";
my $model=3D"ukmo";
my @now =3D localtime;
#
my $dat =3D strftime "%Y%m%d", @now;
my $dat1 =3D $dat + 1;
my $hr =3D strftime "%H", @now;
my $cycle =3D '00'; $cycle =3D '12' if $hr > 15;
#
my $model_mon=3D`date "+%m"`;
my $mon_name=3D`date "+%B"`;
my $yr=3D`date "+%y"`;
#
my $base_dir=3D"/home/Mumba/archive/$model_mon$dash$mon_name$yr ";
#
=A0 chdir $base_dir/$model/$dat;
=A0 my @files =3Dls;
=A0 foreach my $file (@files) {
=A0 *H "." $file > $model$cycle$grib_ext;
#cat *H > $model$cycle$grib_ext;
=A0 /usr/local/bin/grib2ctl.pl -verf $model$cycle$grib_ext > $m=
odel$cycle$ctl_ext;
=A0 /usr/local/grads/bin/gribmap -i $model$cycle$ctl_ext -v -e;
=A0 unlink <*H>;
=A0 #
=A0 rename("$base_dir/$model/$dat1/*H","$base_dir/$model/$dat")=
;
=A0 my @files =3Dls;
=A0 foreach my $file (@files) {
=A0 *H "." $file > $model$cycle$grib_ext;
#cat *H > $model$cycle$UK_sufx$grib_ext;
=A0 /usr/local/bin/grib2ctl.pl -verf $model$cycle$UK_sufx$grib_=
ext > $model$cycle$UK_sufx$ctl_ext;
=A0 /usr/local/grads/bin/gribmap -i=A0 $model$cycle$UK_sufx$ctl=
_ext -v -e;
=A0 unlink <*H>;
#
#
date;
exit 0;
=0A
--0-1267140126-1226561054=:91901
Content-Type: text/html; charset=us-ascii
Esteemed Perl users,
I have a perl script below which is meant to perform a couple of tasks, viz.,
combine several files into one (marked blue in the code below). I have looked, without success, for the command which does this.
1. Help how do I do this (all files end in H)?
2. I have to run another perl script (grib2ctl.pl), is this how to do it (marked blue in the code below).
3. I have to delete the files ending in H. Is unlink <*H>; the way?
Assistance will be appreciated.
Zilore
# #!/usr/bin/perl -w #This script processes UKMO model data from RETIM-SYNERGIE and archives it on #the ACMAD system. The cycles (or times) are 00 and 12. # use strict; use warnings; use POSIX; use File::Path; use File::Copy; # my $ctl_ext=".ctl"; my $grib_ext=".grib"; # my $UK_sufx="2"; my $dash="-"; my $model="ukmo"; my @now = localtime; # my $dat = strftime "%Y%m%d", @now; my $dat1 = $dat + 1; my $hr = strftime "%H", @now; my $cycle = '00'; $cycle = '12' if $hr > 15; # my $model_mon=`date "+%m"`; my $mon_name=`date "+%B"`; my $yr=`date "+%y"`; # my $base_dir="/home/Mumba/archive/$model_mon$dash$mon_name$yr"; # chdir $base_dir/$model/$dat; &nbs
p; my @files =ls; foreach my $file (@files)
{ *H "." $file > $model$cycle$grib_ext; #cat *H > $model$cycle$grib_ext; /usr/local/bin/grib2ctl.pl -verf $model$cycle$grib_ext > $model$cycle$ctl_ext; /usr/local/grads/bin/gribmap -i $model$cycle$ctl_ext -v -e; unlink <*H>; # rename("$base_dir/$model/$dat1/*H","$base_dir/$model/$dat"); my @files =ls; foreach my $file (@files) { &nbs
p; *H "." $file > $model$cycle$grib_ext; #cat *H >
$model$cycle$UK_sufx$grib_ext; /usr/local/bin/grib2ctl.pl -verf $model$cycle$UK_sufx$grib_ext > $model$cycle$UK_sufx$ctl_ext; /usr/local/grads/bin/gribmap -i $model$cycle$UK_sufx$ctl_ext -v -e; unlink <*H>; # # date; exit 0;
|
--0-1267140126-1226561054=:91901--
--===============2075378490==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============2075378490==--
RE: How does one concatenate many files into one?
am 13.11.2008 12:35:46 von mohammed.mustafa
This is a multi-part message in MIME format.
--===============0448173948==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C94583.F8DCAF48"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C94583.F8DCAF48
Content-Type: text/plain;
charset="us-ascii"
content-transfer-encoding: quoted-printable
2. I have to run another perl script (grib2ctl.pl), is this how to do it
(marked blue in the code below).
You use the system command for this as below,
system("perl grib2ctl.pl");
3. I have to delete the files ending in H. Is unlink <*H>; the way?
first do the pattern matching like this,
$file_delete =3D~ /H$/;
and read the complete path like
$file_delete =3D /home/zilore/$file_delete;
system("rm $file_delete);
Use for loop for the itteration to search all H files.
--
Regards,
Mustafa
________________________________
From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of zilore
mumba
Sent: Thursday, November 13, 2008 12:54 PM
To: activeperl@listserv.activestate.com
Subject: How does one concatenate many files into one?
Esteemed Perl users,
I have a perl script below which is meant to perform a couple of tasks,
viz.,
combine several files into one (marked blue in the code below). I have
looked, without success, for the command which does this.
1. Help how do I do this (all files end in H)?
2. I have to run another perl script (grib2ctl.pl), is this how to do it
(marked blue in the code below).
3. I have to delete the files ending in H. Is unlink <*H>; the way?
Assistance will be appreciated.
Zilore
#
#!/usr/bin/perl -w
#This script processes UKMO model data from RETIM-SYNERGIE and archives
it on
#the ACMAD system. The cycles (or times) are 00 and 12.
#
use strict;
use warnings;
use POSIX;
use File::Path;
use File::Copy;
#
my $ctl_ext=3D".ctl";
my $grib_ext=3D".grib";
#
my $UK_sufx=3D"2";
my $dash=3D"-";
my $model=3D"ukmo";
my @now =3D localtime;
#
my $dat =3D strftime "%Y%m%d", @now;
my $dat1 =3D $dat + 1;
my $hr =3D strftime "%H", @now;
my $cycle =3D '00'; $cycle =3D '12' if $hr > 15;
#
my $model_mon=3D`date "+%m"`;
my $mon_name=3D`date "+%B"`;
my $yr=3D`date "+%y"`;
#
my $base_dir=3D"/home/Mumba/archive/$model_mon$dash$mon_name$yr ";
#
chdir $base_dir/$model/$dat;
my @files =3Dls;
foreach my $file (@files) {
*H "." $file > $model$cycle$grib_ext;
#cat *H > $model$cycle$grib_ext;
/usr/local/bin/grib2ctl.pl -verf $model$cycle$grib_ext >
$model$cycle$ctl_ext;
/usr/local/grads/bin/gribmap -i $model$cycle$ctl_ext -v -e;
unlink <*H>;
#
rename("$base_dir/$model/$dat1/*H","$base_dir/$model/$dat");
my @files =3Dls;
foreach my $file (@files) {
*H "." $file > $model$cycle$grib_ext;
#cat *H > $model$cycle$UK_sufx$grib_ext;
/usr/local/bin/grib2ctl.pl -verf $model$cycle$UK_sufx$grib_ext >
$model$cycle$UK_sufx$ctl_ext;
/usr/local/grads/bin/gribmap -i $model$cycle$UK_sufx$ctl_ext -v
-e;
unlink <*H>;
#
#
date;
exit 0;
Please do not print this email unless it is absolutely necessary. =0A=
=0A=
The information contained in this electronic message and any attachments to=
this message are intended for the exclusive use of the addressee(s) and may=
contain proprietary, confidential or privileged information. If you are not=
the intended recipient, you should not disseminate, distribute or copy this=
e-mail. Please notify the sender immediately and destroy all copies of this=
message and any attachments. =0A=
=0A=
WARNING: Computer viruses can be transmitted via email. The recipient should=
check this email and any attachments for the presence of viruses. The compa=
ny accepts no liability for any damage caused by any virus transmitted by th=
is email. =0A=
=0A=
www.wipro.com
------_=_NextPart_001_01C94583.F8DCAF48
Content-Type: text/html;
charset="us-ascii"
content-transfer-encoding: quoted-printable
=
2. I have to
run another perl script (grib2ctl.pl), is this how to do it (marked blue in=
the
code below).
size=3D4>
=
You
use the system command for this as below,
=
system("perl
grib2ctl.pl");
size=3D4>
=
3. I have to
delete the files ending in H. Is unlink <*H>; th=
e
way?
0000ff
size=3D4> first do the pattern mat=
ching
like this,
0000ff
size=3D4> $file_delete =3D~
/H$/;
0000ff
size=3D4> and read the compl=
ete
path like
0000ff
size=3D4> $file_delete =3D
/home/zilore/$file_delete;
0000ff
size=3D4> system("rm
$file_delete);
0000ff
size=3D4>
ial
color=3D#0000ff size=3D2> Use for loop for the itteration=
to
search all H files.
size=3D4>
size=3D4>
--
Regards,
Mustafa
ce=3DArial
size=3D2>
=3D2>
Esteemed Perl users,
I have a perl script below which is meant to perfo=
rm a
couple of tasks, viz.,
combine several files into one (marked blue in the=
code
below). I have looked, without success, for the command which doe=
s
this.
1. Help how do I do this (all files end in
H)?
2. I have to run another perl script (grib2ctl.pl)=
, is
this how to do it (marked blue in the code below).
3. I have to delete the files ending in H. Is
T
color=3D#0000ff>unlink <*H>; the way?
Assistance will be
appreciated.
Zilore
# #!/usr/bin/perl -w #This script processes=
UKMO
model data from RETIM-SYNERGIE and archives it on #the ACMAD syste=
m.
The cycles (or times) are 00 and 12. # use strict; use
warnings; use POSIX; use File::Path; use File::Copy; # =
my
$ctl_ext=3D".ctl"; my $grib_ext=3D".grib"; # my $UK_sufx=3D"2=
"; my
$dash=3D"-"; my $model=3D"ukmo"; my @now =3D localtime; # =
my $dat =3D
strftime "%Y%m%d", @now; my $dat1 =3D $dat + 1; my $hr =3D strft=
ime
"%H", @now; my $cycle =3D '00'; $cycle =3D '12' if $hr > 15; =
# my
$model_mon=3D`date "+%m"`; my $mon_name=3D`date "+%B"`; my $yr=
=3D`date
"+%y"`; # my
$base_dir=3D"/home/Mumba/archive/$model_mon$dash$mon_name$yr "; #
>
chdir $base_dir/$model/$dat;
my @files
=3Dls; foreach my $file=
(@files)
{  =
; *H
"." $file > $model$cycle$grib_ext; #cat *H >
$model$cycle$grib_ext;
size=3D4>/usr/local/bin/grib2ctl.pl -verf
$model$cycle$grib_ext >
$model$cycle$ctl_ext;
/usr/local/grads/bin/gribmap -i $model$cycle$ctl_ext -v
-e;
T
color=3D#0000ff> unlink <*H>;
#
rename("$base_dir/$model/$dat1/*H","$base_dir/$model/$dat"); =
my @files
=3Dls; foreach my $file=
(@files)
{  =
; *H
"." $file > $model$cycle$grib_ext; #cat *H >
$model$cycle$UK_sufx$grib_ext;
>
size=3D4> /usr/local/bin/grib2ctl.pl -verf
$model$cycle$UK_sufx$grib_ext >
$model$cycle$UK_sufx$ctl_ext;
/usr/local/grads/bin/gribmap -i $model$cycle$UK_sufx$ctl_ext -v=
-e;
T
color=3D#0000ff> unlink <*H>;
# # date; exit
0;
|
=3D'font-size:10.0pt;font-family:=0A=
"Palatino Linotype","serif";color:green'> Please do not print this email unl=
ess it is absolutely necessary.
Arial","sans-serif"'>
=0A=
=0A=
=0A=
The information contained in this electronic message and any attachments=
to this message are intended for the exclusive use of the addressee(s) and=
may contain proprietary, confidential or privileged information. If you are=
not the intended recipient, you should not disseminate, distribute or copy=
this e-mail. Please notify the sender immediately and destroy all copies of=
this message and any attachments.
=0A=
=0A=
WARNING: Computer viruses can be transmitted via email. The recipient sho=
uld check this email and any attachments for the presence of viruses. The co=
mpany accepts no liability for any damage caused by any virus transmitted by=
this email.
=0A=
=0A=
www.wipro.com=0A=
------_=_NextPart_001_01C94583.F8DCAF48--
--===============0448173948==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0448173948==--
RE: How does one concatenate many files into one?
am 13.11.2008 14:36:02 von p sena
Hi,
opendir (DIR, $dir...);
@files = grep { -f "$dir/$_" && /*.H$/ } readdir DIR;
close DIR;
unlink @files; ## make sure here full path names are there.
Well, could someone clarify why unlink <*H> or unlink (glob (*H)) is not being discussed here ? This could have been more fast if size is more.
Just chdir $dir and then unlink...
Cheers.
--- On Thu, 11/13/08, mohammed.mustafa@wipro.com wrote:
> From: mohammed.mustafa@wipro.com
> Subject: RE: How does one concatenate many files into one?
> To: zmumba@yahoo.com, activeperl@listserv.activestate.com
> Date: Thursday, November 13, 2008, 5:05 PM
> 2. I have to run another perl script (grib2ctl.pl), is this
> how to do it
> (marked blue in the code below).
>
> You use the system command for this as below,
> system("perl grib2ctl.pl");
>
> 3. I have to delete the files ending in H. Is unlink
> <*H>; the way?
> first do the pattern matching like this,
> $file_delete =~ /H$/;
> and read the complete path like
> $file_delete = /home/zilore/$file_delete;
> system("rm $file_delete);
>
> Use for loop for the itteration to search all H files.
>
>
> --
> Regards,
> Mustafa
>
>
>
> ________________________________
>
> From: activeperl-bounces@listserv.ActiveState.com
> [mailto:activeperl-bounces@listserv.ActiveState.com] On
> Behalf Of zilore
> mumba
> Sent: Thursday, November 13, 2008 12:54 PM
> To: activeperl@listserv.activestate.com
> Subject: How does one concatenate many files into one?
>
>
> Esteemed Perl users,
> I have a perl script below which is meant to perform a
> couple of tasks,
> viz.,
> combine several files into one (marked blue in the code
> below). I have
> looked, without success, for the command which does this.
> 1. Help how do I do this (all files end in H)?
> 2. I have to run another perl script (grib2ctl.pl), is this
> how to do it
> (marked blue in the code below).
> 3. I have to delete the files ending in H. Is unlink
> <*H>; the way?
>
> Assistance will be appreciated.
> Zilore
>
> #
> #!/usr/bin/perl -w
> #This script processes UKMO model data from RETIM-SYNERGIE
> and archives
> it on
> #the ACMAD system. The cycles (or times) are 00 and 12.
> #
> use strict;
> use warnings;
> use POSIX;
> use File::Path;
> use File::Copy;
> #
> my $ctl_ext=".ctl";
> my $grib_ext=".grib";
> #
> my $UK_sufx="2";
> my $dash="-";
> my $model="ukmo";
> my @now = localtime;
> #
> my $dat = strftime "%Y%m%d", @now;
> my $dat1 = $dat + 1;
> my $hr = strftime "%H", @now;
> my $cycle = '00'; $cycle = '12' if $hr >
> 15;
> #
> my $model_mon=`date "+%m"`;
> my $mon_name=`date "+%B"`;
> my $yr=`date "+%y"`;
> #
> my
> $base_dir="/home/Mumba/archive/$model_mon$dash$mon_name$yr";
> #
> chdir $base_dir/$model/$dat;
> my @files =ls;
> foreach my $file (@files) {
> *H "." $file >
> $model$cycle$grib_ext;
> #cat *H > $model$cycle$grib_ext;
> /usr/local/bin/grib2ctl.pl -verf
> $model$cycle$grib_ext >
> $model$cycle$ctl_ext;
> /usr/local/grads/bin/gribmap -i $model$cycle$ctl_ext
> -v -e;
> unlink <*H>;
> #
>
> rename("$base_dir/$model/$dat1/*H","$base_dir/$model/$dat");
> my @files =ls;
> foreach my $file (@files) {
> *H "." $file >
> $model$cycle$grib_ext;
> #cat *H > $model$cycle$UK_sufx$grib_ext;
> /usr/local/bin/grib2ctl.pl -verf
> $model$cycle$UK_sufx$grib_ext >
> $model$cycle$UK_sufx$ctl_ext;
> /usr/local/grads/bin/gribmap -i
> $model$cycle$UK_sufx$ctl_ext -v
> -e;
> unlink <*H>;
> #
> #
> date;
> exit 0;
>
>
>
>
> Please do not print this email unless it is absolutely
> necessary.
>
> The information contained in this electronic message and
> any attachments to this message are intended for the
> exclusive use of the addressee(s) and may contain
> proprietary, confidential or privileged information. If you
> are not the intended recipient, you should not disseminate,
> distribute or copy this e-mail. Please notify the sender
> immediately and destroy all copies of this message and any
> attachments.
>
> WARNING: Computer viruses can be transmitted via email. The
> recipient should check this email and any attachments for
> the presence of viruses. The company accepts no liability
> for any damage caused by any virus transmitted by this
> email.
>
> www.wipro.com
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe:
> http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: How does one concatenate many files into one?
am 14.11.2008 06:34:57 von p sena
Suppose all the files were captured into @files, then for concatenating a=
ll of em into one file.txt do--
First find where is cat command lying in the Unix box. If it is in /usr/bin=
then--
system ("/usr/bin/cat @files >$new_file.txt") ## On Unix
and on Win32
system ("type @files >$new_file.txt") ## On Win32.
BTW, ZMumba, did you used "unlink <*H>" to remove all the files or the alte=
rnative ?
Cheers.
--- On Thu, 11/13/08, zilore mumba wrote:
> From: zilore mumba
> Subject: RE: How does one concatenate many files into one?
> To: senapati2001@yahoo.com
> Date: Thursday, November 13, 2008, 8:38 PM
> Thanks to Sena and Mustafa.
> Unfortunately am very novice in Perl, please see the points
> where I seek clarification below. And by the way, my first
> question which seems to have disappeared is how do you
> concatenate? I have in my code
> cat *H > $model$cycle$UK_sufx$grib_ext;
> or should it be ./cat *H >
> ./$model$cycle$UK_sufx$grib_ext;
> =
> --- On Thu, 11/13/08, p sena
> wrote:
> =
> From: p sena
> Subject: RE: How does one concatenate many files into one?
> To: zmumba@yahoo.com, activeperl@listserv.activestate.com,
> mohammed.mustafa@wipro.com
> Date: Thursday, November 13, 2008, 3:36 PM
> =
> Hi,
> opendir (DIR, $dir...);
> @files =3D grep { -f "$dir/$_" && /*.H$/ }
> readdir DIR;
> close DIR;
> unlink @files; ## make sure here full path names are
> there.I understood this to mean that my code for deleting
> should be:opendir (BASE, $$base_dir/$model/$dat);my @files =3D
> grep { -f "$base_dir/$model/$dat/$_" &&
> /*.H$/ } readdir DIR;
> close DIR;
> unlink @files $base_dir/$model/$dat/$_" &&
> /*.H$/ ; ## make sure here full path names are there.
> =
> Well, could someone clarify why unlink <*H> or unlink
> (glob (*H)) is not
> being discussed here ? This could have been more fast if
> size is more.
> Just chdir $dir and then unlink...Cheers.
> --- On Thu, 11/13/08, mohammed.mustafa@wipro.com
> wrote:
> > From: mohammed.mustafa@wipro.com
>
> > Subject: RE: How does one concatenate many files into
> one?
> > To: zmumba@yahoo.com,
> activeperl@listserv.activestate.com
> > Date: Thursday, November 13, 2008, 5:05 PM
> > You use the system command for this as below,
> > =
> system("perl grib2ctl.pl";=A0 F =A0this part here
> is what I put in my code
> system("perl /usr/local/bin/grib2ctl.pl") -verf
> $model$cycle$UK_sufx$grib_ext >
> $model$cycle$UK_sufx$ctl_ext;
> system("/usr/local/grads/bin/gribmap") -i=A0
> $model$cycle$UK_sufx$ctl_ext -v -e;
> =
> =A0
> > first do the pattern matching like this,
> > $file_delete =3D~ /H$/;
> > and read the complete path like
> > $file_delete =3D /home/zilore/$file_delete;
> > system("rm $file_delete);
> > Use for loop for the itteration to search all
> H files.
> > $file_delete =3D~ /H$/;
> =A0 $file_delete =3D
> $base_dir/$model/$dat/$file_delete;
> =A0 system("rm $file_delete);
> > =
> > --
> > Regards,
> > Mustafa
> > =
> > =
> > =
> > ________________________________
> > =
> > From: activeperl-bounces@listserv.ActiveState.com
> > [mailto:activeperl-bounces@listserv.ActiveState.com]
> On
> > Behalf Of zilore
> > mumba
> > Sent: Thursday, November 13, 2008 12:54 PM
> > To: activeperl@listserv.activestate.com
> > Subject: How does one concatenate many files into one?
> > =
> > =
> > Esteemed Perl users,
> > I have a perl script below which is meant to perform a
> > couple of tasks,
> > viz.,
> > combine several files into one (marked blue in the
> code
> > below). I have
> > looked, without success, for the command which does
> this.
> > 1. Help how do I do this (all files end in H)?
> > 2. I have to run another perl script (grib2ctl.pl), is
> this
> > how to do it
> > (marked blue in the code below).
> > 3. I have to delete the files ending in H. Is unlink
> > <*H>; the way?
> > =
> > Assistance will be appreciated.
> > Zilore
> > =
> > #
> > #!/usr/bin/perl -w
> > #This script processes UKMO model data from
> RETIM-SYNERGIE
> > and archives
> > it on
> > #the ACMAD system. The cycles (or times) are 00 and
> 12.
> > #
> > use strict;
> > use warnings;
> > use POSIX;
> > use File::Path;
> > use File::Copy;
> > #
> > my $ctl_ext=3D".ctl";
> > my $grib_ext=3D".grib";
> > #
> > my $UK_sufx=3D"2";
> > my $dash=3D"-";
> > my $model=3D"ukmo";
> > my @now =3D localtime;
> > #
> > my $dat =3D strftime "%Y%m%d", @now;
> > my $dat1 =3D $dat + 1;
> > my $hr =3D strftime "%H", @now;
> > my $cycle =3D '00'; $cycle =3D '12' if $hr
> >
> > 15;
> > #
> > my $model_mon=3D`date "+%m"`;
> > my $mon_name=3D`date "+%B"`;
> > my $yr=3D`date "+%y"`;
> > #
> > my
> >
> $base_dir=3D"/home/Mumba/archive/$model_mon$dash$mon_name$yr ";
> > #
> > chdir $base_dir/$model/$dat;
> > my @files =3Dls;
> > foreach my $file (@files) {
> > *H "." $file >
> > $model$cycle$grib_ext;
> > #cat *H > $model$cycle$grib_ext;
> > /usr/local/bin/grib2ctl.pl -verf
> > $model$cycle$grib_ext >
> > $model$cycle$ctl_ext;
> > /usr/local/grads/bin/gribmap -i
> $model$cycle$ctl_ext
> > -v -e;
> > unlink <*H>;
> > #
> > =A0 =
> >
> rename("$base_dir/$model/$dat1/*H","$base_dir/$model/$dat");
> > my @files =3Dls;
> > foreach my $file (@files) {
> > *H "." $file >
> > $model$cycle$grib_ext;
> > #cat *H > $model$cycle$UK_sufx$grib_ext;
> > /usr/local/bin/grib2ctl.pl -verf
> > $model$cycle$UK_sufx$grib_ext >
> > $model$cycle$UK_sufx$ctl_ext;
> > /usr/local/grads/bin/gribmap -i =
> > $model$cycle$UK_sufx$ctl_ext -v
> > -e;
> > unlink <*H>;
> > =A0 #
> > #
> > date;
> > exit 0;
> > =
> > =
> > =
> > =
> > Please do not print this email unless it is absolutely
> > necessary. =
> > =
> > The information contained in this electronic message
> and
> > any attachments to this message are intended for the
> > exclusive use of the addressee(s) and may contain
> > proprietary, confidential or privileged information.
> If you
> > are not the intended recipient, you should not
> disseminate,
> > distribute or copy this e-mail. Please notify the
> sender
> > immediately and destroy all copies of this message and
> any
> > attachments. =
> > =
> > WARNING: Computer viruses can be transmitted via
> email. The
> > recipient should check this email and any attachments
> for
> > the presence of viruses. The company accepts no
> liability
> > for any damage caused by any virus transmitted by this
> > email. =
> > =
> > www.wipro.com
> > _______________________________________________
> > ActivePerl mailing list
> > ActivePerl@listserv.ActiveState.com
> > To unsubscribe:
> > http://listserv.ActiveState.com/mailman/mysubs
> =
> =
> =A0 =
> =
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe:
> http://listserv.ActiveState.com/mailman/mysubs
=
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs