well, one of my colleagues pointed out a feature of fortran 2003,
which I, being an idiot, have missed. YOu have access='stream'
in f2003, which is all I need. No record separators, just data.
many thanks for all your help and advice.
anton
--
Anton Shterenlikht
Room 2.6, Queen's Building
On Fri, Dec 18, 2009 at 09:33:49AM -0700, Warren Block wrote:
per...@pluto.rain.com wrote:
Greg Larkin glar...@freebsd.org wrote:
...
truncate -4 myfile should get rid of the last four bytes. Maybe
there's a similar efficient way to truncate the start of a file.
This
On Thu, Dec 17, 2009 at 06:38:04PM -0700, Warren Block wrote:
On Fri, 18 Dec 2009, Anton Shterenlikht wrote:
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of each record, which, in the case of a binary
file, is just at the
On Thu, Dec 17, 2009 at 08:45:02PM -0500, Greg Larkin wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Warren Block wrote:
On Fri, 18 Dec 2009, Anton Shterenlikht wrote:
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of
On Fri, Dec 18, 2009 at 09:33:49AM -0700, Warren Block wrote:
per...@pluto.rain.com wrote:
Greg Larkin glar...@freebsd.org wrote:
...
truncate -4 myfile should get rid of the last four bytes. Maybe
there's a similar efficient way to truncate the start of a file.
This should do
Anton Shterenlikht wrote:
On Fri, Dec 18, 2009 at 02:09:58AM +0100, Rolf Nielsen wrote:
Anton Shterenlikht wrote:
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of each record, which, in the case of a binary
file, is just at the
On Fri, 18 Dec 2009 01:29:18 +, Anton Shterenlikht me...@bristol.ac.uk
wrote:
My bet would be /usr/ports/editors/hexedit. Been a while since I've
used it, but AFAIR, it has a curses or a curses like interface, and
it's fairly simple to use, yet sufficiently powerful for most normal
binary
Greg Larkin glar...@freebsd.org wrote:
...
truncate -4 myfile should get rid of the last four bytes. Maybe
there's a similar efficient way to truncate the start of a file.
This should do it:
dd if=oldfile of=newfile bs=1 skip=4
Or, perhaps marginally more efficient:
dd if=oldfile
If your Fortran file has the same word size and enddian-ness as your
C, this simple program convert.c will strip all the record length
fields. I just knocked it up now, no warranty, etc, but it works for
me. Use as a pipe:
$ ls
convert.c test.f
$ gcc -Wall -Werror -ansi -pedantic
If you don't mind, I would add fixed buffer processing to your program.
For some really huge files (or any other type of stream) which have
really huge records, reading entire records into memory would get the
box down.
Markiyan
/* convert.c: remove record length fields from Fortran output
per...@pluto.rain.com wrote:
Greg Larkin glar...@freebsd.org wrote:
...
truncate -4 myfile should get rid of the last four bytes. Maybe
there's a similar efficient way to truncate the start of a file.
This should do it:
dd if=oldfile of=newfile bs=1 skip=4
Or, perhaps marginally more
At 2009-12-18 16:33:49+, Warren Block writes:
per...@pluto.rain.com wrote:
Greg Larkin glar...@freebsd.org wrote:
...
truncate -4 myfile should get rid of the last four bytes. Maybe
there's a similar efficient way to truncate the start of a file.
This should do it:
On Fri, Dec 18, 2009 at 09:33:49AM -0700, Warren Block wrote:
per...@pluto.rain.com wrote:
Greg Larkin glar...@freebsd.org wrote:
...
truncate -4 myfile should get rid of the last four bytes. Maybe
there's a similar efficient way to truncate the start of a file.
This should do
On Fri, Dec 18, 2009 at 04:38:16PM +, Nick Barnes wrote:
At 2009-12-18 16:33:49+, Warren Block writes:
per...@pluto.rain.com wrote:
Greg Larkin glar...@freebsd.org wrote:
...
truncate -4 myfile should get rid of the last four bytes. Maybe
there's a similar efficient
Nick Barnes wrote:
All very interesting, but the OP is wanting to lose all the Fortran
record markers, not just the first (and last) four bytes of the file.
The record markers precede and follow each record, and give the
record's length. The size and enddian-ness of the record marker
itself
Anton Shterenlikht wrote:
On Fri, Dec 18, 2009 at 09:33:49AM -0700, Warren Block wrote:
per...@pluto.rain.com wrote:
Greg Larkin glar...@freebsd.org wrote:
...
truncate -4 myfile should get rid of the last four bytes. Maybe
there's a similar efficient way to truncate the start of a file.
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of each record, which, in the case of a binary
file, is just at the beginning and at the end of the file.
I need to delete these record delimiters, because the
software I use to visualise the
Anton Shterenlikht wrote:
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of each record, which, in the case of a binary
file, is just at the beginning and at the end of the file.
I need to delete these record delimiters, because the
On Fri, Dec 18, 2009 at 02:09:58AM +0100, Rolf Nielsen wrote:
Anton Shterenlikht wrote:
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of each record, which, in the case of a binary
file, is just at the beginning and at the end of
Anton Shterenlikht wrote:
On Fri, Dec 18, 2009 at 02:09:58AM +0100, Rolf Nielsen wrote:
Anton Shterenlikht wrote:
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of each record, which, in the case of a binary
file, is just at the
On Fri, 18 Dec 2009, Anton Shterenlikht wrote:
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of each record, which, in the case of a binary
file, is just at the beginning and at the end of the file.
I need to delete these record
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Warren Block wrote:
On Fri, 18 Dec 2009, Anton Shterenlikht wrote:
I'm creating binary files in fortran.
Fortran adds 4 byte record delimiters at the beginning
and the end of each record, which, in the case of a binary
file, is just at the
22 matches
Mail list logo