C Program Data Conversion

Cliff Manis cmanis at csoftec.csf.com
Tue Sep 18 13:10:16 AEST 1990


                I need help in writing a 'C' program

I need help in writing a 'C' program to do the following.  It must be simple
but I can't seem to get it working.  Below is a datafile which in which 
line 1 always starts with "1990" and it ends with a carriage return, and
goes to line two of that data record.  The data separators are spaces.

All I want to do is:  If the line start with "1990", move to the end, delete
the carriage return, put in a space, and append the second line.

Now that really sounds simple - doesn't it ? ? ?  But, I am trying to convert
some data, and need help !

/below is a sample of datafile/
1990 aaa bbbbb ccc ddd eeeeeee fff
ggggg
1990 aaa bbb ccccccccc ddd eee fff
gggggggggg
1990 aaa bbb ccc ddddddd eee fff
ggggggg

There must be a million ways to do this, but I only need one ! !

Thanks, for any help ! !    Cliff Manis
_ 
    Standard Disclaimer:  We are not associated with anyone. (PERIOD). (.)
 | INTERNET: cmanis at csoftec.csf.com     UUCP: swrinde!csoftec!cmanis       |
_=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=_  



More information about the Comp.unix.xenix.sco mailing list