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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
There is less than 24 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a very large file with column data that doesn't have any headers it is space seperated, sometime several spaces, and it's too big to open in a text editor. I'll call it C.dat. So I do something like
head -300 C.dat > littleC.dat
and I can see some of the file contents.
I have another file with row formated text information, like 700 or so rows. I'll call it R.txt. The R.txt file has the "field" information that goes with the columns in C.dat. The R.txt file looks like this:
so the row of information that I need to use from R.txt is FIELD_NAME, and what I'd like to do is strip out each FIELD_NAME string and write it to an another output file along with an index number. I need the index number for another tool that filters by column index.
each "block" of field info is indexed correctly down the R.txt file even though the FIELD_COLUMN numbers are not, so I don't think that I really care about the FIELD_COLUMN numbers, and I can just go down the R.txt file using only the FIELD_NAME string and placing it sequentially in line in the new output file.
here's what I'd like the file to look like:
so this kinda somewhat works, but not really. I don't know how to create the index_counter and the results of sed give more than just the FIELD_NAME string which I don't understand becasue my grep only has the FIELD_NAME string.