Creating a condensed table from a pre-existing table in putty
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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Creating a condensed table from a pre-existing table in putty
Hello,
I'm working with putty on Windows 7 professional and I'd like to know if there's a way to gather specific lines from a pre-existing table and make a new table with that information.
More specifically, I'd like the program to look at a specific column, say column N, and see if any of the rows in the column contain specific words (i.e. from this_is_what_i'm_looking_for, I'd like to to find all the rows in the colum that contain this_is), and print all these rows in a new table that I can save.
I can do this using Excel, but I'd like to know if there's a way to do it using putty.
and I want my program to go through newfilename.txt and look at all the numbers found in the third column of the first file (1235, 1238, 5793) and output the corresponding 3rd column in the second file, for each one
i.e.
the third column of the first file has the numbers 1235, so it would find 1235 in the second file and output 1235 moreinfo4.
It may be possible to do this in vim, but what you describe is really a job for join. In fact, this is pretty much exactly the kind of operation join was designed to perform:
-1 4 -2 1: Compare the fourth field in the first file with the first field in the second file. -o "1.4 2.3": Output the contents of the fourth field from the first file and the third field from the second file. newfilename.txt: The name of the first file is "newfilename.txt" otherfile.txt: The name of the second file is "otherfile.txt"
If you want the results stored in a file rather that shown onscreen, just redirect the output to a file with the > operator (> results.txt).
For this to work, both input files must be sorted by the columns you're comparing against. sort can to that for you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.