Grepping al values of a particular column in a file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Grepping al values of a particular column in a file
# 1  
Old 09-02-2014
Grepping al values of a particular column in a file

Code:
Name                                   Num_free    Num_active  Pct_act Max_Used    Reuse_cnt   Instance_Name
 ---------------------------------  ---------------    -----------           -------   ----------- ----------- ------------------------------
 additional network memory               0    14801328         100.00     14801328                      0 NULL
 audit queue size                           100                  0             0.00                   0            0 NULL
 compression info pool siz         17986          14782           45.11           15207            0 NULL
 disk i/o structures                       4096                  0             0.00               179            0 NULL
 heap memory per user              44962            4190             8.52             4632           0 NULL
 kernel resource memory           25455            7313           22.32             7313            0 NULL
 max cis remote connection           800                  0             0.00                   0            0 NULL
 max memory                                      0      5242880         100.00       5242880            0 NULL


Last edited by Don Cragun; 09-02-2014 at 06:22 AM.. Reason: Add CODE tags.
# 2  
Old 09-02-2014
try
Code:
awk '{print $6}' filename

# 3  
Old 09-02-2014
Moderator's Comments:
Mod Comment I see that the 1st message in this thread has been modified 6 times (including twice by moderators trying to add CODE tags.

The current contents of that message give no indication of what is to be done with the data that is presented, and, since the fields don't line up with the headings, is hard to guess at what is desired.

Please explain what you are trying to do, show us what code you have tried to accomplish your task, and show us the output you are trying to produce from your sample input (all with CODE tags so we can differentiate between various types of spacing in your sample input, output, and code segments).
This User Gave Thanks to Don Cragun For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grepping multiple strings from one column

I have 3-column tab separated data that looks like the following: act of+n-a-large+vn-tell-v 0.067427 act_com of+n+n-a-large-manufacturer-n 0.129922 act-act_com-com in+n-j+vn-pass-aux-restate-v 0.364499666667 com nmod+n-j+ns-invader-n 0.527521 act_com-com obj+n-a-j+vd-contribute-v 0.091413... (2 Replies)
Discussion started by: owwow14
2 Replies

2. Shell Programming and Scripting

Grepping one file column from another file

Hi all, I want to search the second col of a file as a sub-part of 4th col of another file and produce a joint output. In the example, search if B is contained as a sub-part in E:B:C (sub-parts separated by colons). Note the second row is not found doesnt find a match as F isnt there in col 4... (19 Replies)
Discussion started by: newbie83
19 Replies

3. Shell Programming and Scripting

Remove the values from a certain column without deleting the Column name in a .CSV file

(14 Replies)
Discussion started by: dhruuv369
14 Replies

4. Programming

Grepping a column from multiple file

I have 20 files that look pretty much like this: 0.01 1 3822 4.97379915032e-14 4.96982253992e-09 0 0.01 3822 1 4.97379915032e-14 4.96982253992e-09 0 0.01 2 502 0.00993165137406 993.165137406 0 0.01 502 2 0.00993165137406 993.165137406 0 0.01 4 33 0.00189645523539 189.645523539 0 0.01 33 4... (5 Replies)
Discussion started by: kayak
5 Replies

5. Programming

grepping a range of values

I need to return all records in a file starting with a row that says TABLE: <tabl name> lists of hexadecimal records TABLE: <some table> TABLe is a key word in the file. I know the name of the table I want to start with. I do not know the name of the table that I will end with. I just... (4 Replies)
Discussion started by: guessingo
4 Replies

6. Shell Programming and Scripting

print unique values of a column and sum up the corresponding values in next column

Hi All, I have a file which is having 3 columns as (string string integer) a b 1 x y 2 p k 5 y y 4 ..... ..... Question: I want get the unique value of column 2 in a sorted way(on column 2) and the sum of the 3rd column of the corresponding rows. e.g the above file should return the... (6 Replies)
Discussion started by: amigarus
6 Replies

7. UNIX for Dummies Questions & Answers

Grepping A Specific Column

Hello, I have a log file that outputs the data below. I would like to grep and display the data where column is equal '148.' I've searched the forum, and couldn't find any answers. I've tried all the grep switches and I get the same result as the log. I'm thinking I might have to use an... (4 Replies)
Discussion started by: ravzter
4 Replies

8. Shell Programming and Scripting

How to check Null values in a file column by column if columns are Not NULLs

Hi All, I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
Discussion started by: Mandab
7 Replies

9. Shell Programming and Scripting

grepping many values from same files

Hi All, I am having a script in which I am greping some values and storing them from files with .err and .log extensions. I feel I can do it better.But How? Below is my piece of code. oneerrors=`egrep -i -n "one" *.err *.log` twoerrors=`egrep -i -n "two" *.err *.log` ... (2 Replies)
Discussion started by: Sreejith_VK
2 Replies
Login or Register to Ask a Question