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
Mech
On Fri, Dec 18, 2009 at 09:33:49AM -0700, Warren Block wrote:
> per...@pluto.rain.com wrote:
> > Greg Larkin 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 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
> >>
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
Anton Shterenlikht wrote:
On Fri, Dec 18, 2009 at 09:33:49AM -0700, Warren Block wrote:
per...@pluto.rain.com wrote:
Greg Larkin 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:
d
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 dep
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 wrote:
> > > > ...
> > > > > truncate -4 myfile should get rid of the last four bytes. Maybe
> > > > > there's a similar efficient wa
On Fri, Dec 18, 2009 at 09:33:49AM -0700, Warren Block wrote:
> per...@pluto.rain.com wrote:
> > Greg Larkin 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
At 2009-12-18 16:33:49+, Warren Block writes:
> per...@pluto.rain.com wrote:
> > Greg Larkin 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:
> > >
>
per...@pluto.rain.com wrote:
Greg Larkin 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:
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 fi
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 convert.c
Greg Larkin 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 of=newfile bs=4
On Fri, 18 Dec 2009 01:29:18 +, Anton Shterenlikht
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 editing. If
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 beginnin
-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
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 delimite
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 beginnin
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
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
softwa
20 matches
Mail list logo