Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
That goes for the input too. What do the lines after the header look like? How many are there? How exactly should they appear in the output? Can there be more lines than header entries? And if so, do you loop them, or what? Etc.
In short, give us an actual example of the input and the desired output, and explain in detail how they relate to each other.
And please use ***[code][/code] tags*** around all of your code and data, to preserve formatting and to improve readability. Please do not use quote tags, bolding, colors, or other fancy formatting.
High David, thank you for your sound post on what is needed to help solve my problem and some formatting.
Unfortunately I can not post an actual data file because it is held on a LAN. I'll try to do a better job describing my input data file. It's a standard csv data file that could easily be read into excel and then do a transform (using excel) on just the first row, but my computer only has linux. Here's just an example representing what one of the data files looks like.
so it's just one row of header fields, delimited by comas, and then the data is also delimited by comas. The number of rows of data can be in the thousands. Some of the files will have 12 columns and some of them have 21, some 54, and some 66. They're all different. Because they are all different, it would be really good if I had a listing of how many fields are in each file and what's in each field. Because the number of columns can also be pretty large (like 66) I think that a row to column transform on just the first row would be really good. It would also be really helpful to have an index value placed next to the header field. So an output file might looks like: