home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!thinkage!atbowler
- From: atbowler@thinkage.on.ca (Alan Bowler)
- Subject: Re: How to fprintf two column
- Message-ID: <1992Aug29.011159.14523@thinkage.on.ca>
- Organization: /etc/organization
- References: <5663.87.uupcb@wugate.wustl.edu>
- Date: Sat, 29 Aug 1992 01:11:59 GMT
- Lines: 21
-
- In article <5663.87.uupcb@wugate.wustl.edu> jon.ault%travel@wugate.wustl.edu (Jon Ault) writes:
- >VA. I need the following output to a file:
- > . 1.2 2.3
- > . 1.3 2.4 1.4 2.5
- > . ....
- > . which contains two columns. They are not generated at the same
- > . time, i.e. at the first the first column is generated and then
- > . write to a file. then the file is rewinded and the second column is
- > . generated. Now I need write the second column to that particular
- > . place, say begin with 10th column. I have tried fseek() but it
- > . seems to me not working. (?)
- >
- >I would approach this by writing the first column out to a temp file,
- >then reading it back in and appending the second column, writing that
- >out to the final output file.
-
- Right solution. You might hunt arround for an existing utility to
- to this column concatenation. Its trivial in some editors, and often
- statistical packages have some side tools that do exactly this with
- files. It is not hard to "rool your own" but why bother if the utility
- is already on the system.
-