Forum: Ruby Updating header in file.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7070c0ca59124b4d96dd27ea52ad359e?d=identicon&s=25 Jeffrey Bowen (Guest)
on 2007-08-02 23:08
(Received via mailing list)
I have a text file where the first line is the header
being used by CSV.  The second line to the end is data
for each header.  How can I append the header?  The
program I'm writing looks new entries in a data file
and wants to add it to the end of the header.  I've
looked though CSV, file and IO and I don't see what I
need.

Thanks Jeff


      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user
panel and lay it on us.
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
333103e4407bb5c415e5b5e9ade71f20?d=identicon&s=25 Matt White (Guest)
on 2007-08-02 23:45
(Received via mailing list)
On Aug 2, 3:07 pm, Jeffrey Bowen <ja_bo...@yahoo.com> wrote:
> 
____________________________________________________________________________________
> Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it 
on us.http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7

Jeff,

Can you please clarify and post an example of what you mean? Append
the header to what?

Matt White
7070c0ca59124b4d96dd27ea52ad359e?d=identicon&s=25 Jeffrey Bowen (Guest)
on 2007-08-02 23:56
(Received via mailing list)
end of header = status#1, status#2, status#3
data line = 100, 60, --- 55

new header end = status#1, status#2, status#3,
status#4
data line = 100, 60, 55
new data line = 100, 60, 55, 10

Jeff


--- Matt White <whiteqt@gmail.com> wrote:

> > and wants to add it to the end of the header.
> I've
> > looked though CSV, file and IO and I don't see
> what I
> > need.
> >
> > Thanks Jeff
> >
> >
>
____________________________________________________________________________________
> > Fussy? Opinionated? Impossible to please? Perfect.
>  Join Yahoo!'s user panel and lay it on
>
us.http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
>
____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user
panel and lay it on us.
http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2007-08-03 00:28
(Received via mailing list)
On 8/2/07, Jeffrey Bowen <ja_bowen@yahoo.com> wrote:
> end of header = status#1, status#2, status#3
> data line = 100, 60, --- 55
>
> new header end = status#1, status#2, status#3,
> status#4
> data line = 100, 60, 55
> new data line = 100, 60, 55, 10

Is that actually how your data is structured? It's not clear from the
example.
This topic is locked and can not be replied to.