Concatenating files

Concatenating files

am 15.04.2009 16:59:16 von zilore mumba

--===============2083229082==
Content-Type: multipart/alternative; boundary="0-1715428096-1239807556=:61218"


--0-1715428096-1239807556=:61218
Content-Type: text/plain; charset=us-ascii

Thanks to all who have spent precisous time looking at my code.
Perhaps let me clarify a few things
1. I am working on Windows with cygwin (and perl) installed. When I did which cat I got the path and indded cat is there.
2. I write the date to file because when I use it I get 2009414 (for example istead of 20090414). That part of the code works.
3. The files are meteorological reports (synop, temp, metar, etc) which keep coming as they are produced so one cannot guess the exact named of the report, except that it is msgnnnnnnnn where nnn... is an 8-digit number.
4. The idea of the program is to put all report for a day in one file and them they are processed by other programs.
Thanks
Zilore




--0-1715428096-1239807556=:61218
Content-Type: text/html; charset=us-ascii

Thanks to all who have spent precisous time looking at my code.

Perhaps let me clarify a few things

1. I am working on Windows with cygwin (and perl) installed. When I did which cat I got the path and indded cat is there.

2. I write the date to file because when I use it I get 2009414 (for example istead of 20090414). That part of the code works.

3. The files are meteorological reports (synop, temp, metar, etc) which keep coming as they are produced so one cannot guess the exact named of the report, except that it is msgnnnnnnnn where nnn... is an 8-digit number.

4. The idea of the program is to put all report for a day in one file and them they are processed by other programs.

Thanks

Zilore




--0-1715428096-1239807556=:61218--

--===============2083229082==
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
--===============2083229082==--

RE: Concatenating files

am 15.04.2009 18:43:08 von Brian Raven

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of zilore
mumba
Sent: 15 April 2009 15:59
To: activeperl@listserv.activestate.com
Subject: Concatenating files

> Thanks to all who have spent precisous time looking at my code.
> Perhaps let me clarify a few things
> 1. I am working on Windows with cygwin (and perl) installed. When I
did which cat I got the path and indded cat > is there.

However, if your command shell is the default for win32, it will not
like you expressing a path like that (it treats '/' as a switch prefix,
not a directory separator). What do you get when you try to run cat from
the default win32 command prompt like that? Try cat without the explicit
path. If it works for mv it should work for cat.

> 2. I write the date to file because when I use it I get 2009414 (for
example istead of 20090414). That part of > the code works.

It is the printf part that does the formatting that you want. If you use
sprintf instead you don't need to write a file. See 'perldoc -f
sprintf'.

> 3. The files are meteorological reports (synop, temp, metar, etc)
which keep coming as they are produced so one > cannot guess the exact
named of the report, except that it is msgnnnnnnnn where nnn... is an
8-digit number.
> 4. The idea of the program is to put all report for a day in one file
and them they are processed by other
> programs.

Your code seemed to have some logic errors. I believe I pointed out a
couple of them.

HTH

--
Brian Raven
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs