Extract data based on match against one column data from a long list data


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Extract data based on match against one column data from a long list data
Prev   Next
# 1  
Old 11-16-2009
Extract data based on match against one column data from a long list data

My input file:
data_5 Ali 422 2.00E-45 102/253 140/253 24
data_3 Abu 202 60.00E-45 12/23 140/23 28
data_1 Ahmad 256 7.00E-45 120/235 140/235 22
data_4 Aman 365 8.00E-45 15/65 140/65 20
data_10 Jones 869 9.00E-45 65/253 140/253 18
data_50 Pink 785 6.00E-45 12/253 140/253 16
data_6 Twins 133 4.00E-45 192/253 140/253 14
data_9 Orange 165 3.00E-45 150/253 140/253 12
data_7 King 258 1.00E-45 184/253 140/253 80

My output file:
data_50 Pink 785 6.00E-45 12/253 140/253 16
data_6 Twins 133 4.00E-45 192/253 140/253 14
data_9 Orange 165 3.00E-45 150/253 140/253 12
data_7 King 258 1.00E-45 184/253 140/253 80

I would like to extract all the content after it match the column 4 is 6.00E-45 or it other way extract the content after it find out the column 4 is 9.00E-45.
Does anybody got good suggestion about how to get this desired output result? I think awk should be able to do this?
Thanks a lot for sharing Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Data match 2 files based on first 2 columns matching only and join if match

Hi, i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file I have tried with join and awk and i keep getting blank outputs or same file is there an easier way than what i am... (4 Replies)
Discussion started by: axis88
4 Replies

2. Shell Programming and Scripting

In PErl script: need to read the data one file and generate multiple files based on the data

We have the data looks like below in a log file. I want to generat files based on the string between two hash(#) symbol like below Source: #ext1#test1.tale2 drop #ext1#test11.tale21 drop #ext1#test123.tale21 drop #ext2#test1.tale21 drop #ext2#test12.tale21 drop #ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies

3. Shell Programming and Scripting

Match and extract data using two files

Hello, Using the information in file 1, I would like to extract from file2 all rows which matchs in column 3. file 1 1233 1230 1231 1232 file2 65733.00 19775.00 1220 65733.00 19793.00 1220 65733.00 19801.00 1220 65733.00 19809.00 1231 65733.00 19817.00 ... (2 Replies)
Discussion started by: jiam912
2 Replies

4. Shell Programming and Scripting

Generate tabular data based on a column value from an existing data file

Hi, I have a data file with : 01/28/2012,1,1,98995 01/28/2012,1,2,7195 01/29/2012,1,1,98995 01/29/2012,1,2,7195 01/30/2012,1,1,98896 01/30/2012,1,2,7083 01/31/2012,1,1,98896 01/31/2012,1,2,7083 02/01/2012,1,1,98896 02/01/2012,1,2,7083 02/02/2012,1,1,98899 02/02/2012,1,2,7083 I... (1 Reply)
Discussion started by: himanish
1 Replies

5. Shell Programming and Scripting

Compare 2 files and match column data and align data from 3 column

Hello experts, Please help me in achieving this in an easier way possible. I have 2 csv files with following data: File1 08/23/2012 12:35:47,JOB_5330 08/23/2012 12:35:47,JOB_5330 08/23/2012 12:36:09,JOB_5340 08/23/2012 12:36:14,JOB_5340 08/23/2012 12:36:22,JOB_5350 08/23/2012... (5 Replies)
Discussion started by: asnandhakumar
5 Replies

6. UNIX for Advanced & Expert Users

Convert column data to row data using shell script

Hi, I want to convert a 3-column data to 3-row data using shell script. Any suggestion in this regard is highly appreciated. Thanks. (4 Replies)
Discussion started by: sktkpl
4 Replies

7. Shell Programming and Scripting

Replace data of one column with data on other file corresponding to transaction ID matched

Hi All, I have two files one of which having some mobile numbers and corresponding value whose sample content as follows: 9058629605,8.0 9122828964,30.0 And in second file complete details of all mobile numbers and sample content as follows and delimeter used is comma(,): ... (8 Replies)
Discussion started by: poweroflinux
8 Replies

8. Shell Programming and Scripting

Extract specific data content from a long list of data

My input: Data name: ABC001 Data length: 1000 Detail info Data Direction Start_time End_time Length 1 forward 10 100 90 1 forward 15 200 185 2 reverse 50 500 450 Data name: XFG110 Data length: 100 Detail info Data Direction Start_time End_time Length 1 forward 50 100 50 ... (11 Replies)
Discussion started by: patrick87
11 Replies

9. Shell Programming and Scripting

extract data from a data matrix with filter criteria

Here is what old matrix look like, IDs X1 X2 Y1 Y2 10914061 -0.364613333 -0.362922333 0.001691 -0.450094667 10855062 0.845956333 0.860396667 0.014440333 1.483899333... (7 Replies)
Discussion started by: ssshen
7 Replies

10. UNIX for Dummies Questions & Answers

X11 auth data does not match fake data

We have different unix servers, let say I have server 1 and server 2. Well whenever I ssh from server 1 to server 2, I'm ok, but when I ssh from server 2 to server 1, I can connect just fine, but I get this message: X11 auth data does not match fake data X11 auth data does not match fake data... (1 Reply)
Discussion started by: samytrix
1 Replies
Login or Register to Ask a Question
iconv_1250(5)						Standards, Environments, and Macros					     iconv_1250(5)

NAME
iconv_1250 - code set conversion tables for MS 1250 (Windows Latin 2) DESCRIPTION
The following code set conversions are supported: +----------------------------------------------------------------------+ | Code Set Conversions Supported | +-------------+----------+--------------+----------+-------------------+ | Code | Symbol | Target Code | Symbol | Target Output | +-------------+----------+--------------+----------+-------------------+ |MS 1250 | win2 | ISO 8859-2 |iso2 |ISO Latin 2 | +-------------+----------+--------------+----------+-------------------+ |MS 1250 | win2 | MS 852 |dos2 |MS-DOS Latin 2 | +-------------+----------+--------------+----------+-------------------+ |MS 1250 | win2 | Mazovia |maz |Mazovia | +-------------+----------+--------------+----------+-------------------+ |MS 1250 | win2 | DHN |dhn |Dom Handlowy Nauki | +-------------+----------+--------------+----------+-------------------+ CONVERSIONS
The conversions are performed according to the following tables. All values in the tables are given in octal. MS 1250 to ISO 8859-2 For the conversion of MS 1250 to ISO 8859-2, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | MS 1250 | ISO 8859-2 | MS 1250 | ISO 8859-2 | |24-211 | 40 |235 |273 | |212 | 251 |236 |276 | |213 | 40 |237 |274 | |214 | 246 |241 |267 | |215 | 253 |245 |241 | |216 | 256 |246-267 |40 | |217 | 254 |271 |261 | |221-231 | 40 |273 |40 | |232 | 271 |274 |245 | |233 | 40 |276 |265 | |234 | 266 |247 |365 | +---------------+----------------+----------------+---------------+ MS 1250 to MS 852 For the conversion of MS 1250 to MS 852, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | MS 1250 | MS 852 | MS 1250 | MS 852 | |200-211 | 40 |311 |220 | |212 | 346 |312 |250 | |213 | 40 |313 |323 | |214 | 227 |314 |267 | |215 | 233 |315 |326 | |216 | 246 |316 |327 | |217 | 215 |317 |322 | |220-231 | 40 |320 |321 | |232 | 347 |321 |343 | |233 | 40 |322 |325 | |234 | 230 |323 |340 | |235 | 234 |324 |342 | |236 | 247 |325 |212 | |237 | 253 |326 |231 | |240 | 377 |327 |236 | |241 | 363 |330 |374 | |242 | 364 |331 |336 | |243 | 235 |332 |351 | |244 | 317 |333 |353 | |245 | 244 |334 |232 | |246 | 40 |335 |355 | |247 | 365 |336 |335 | |250 | 371 |337 |341 | |251 | 40 |340 |352 | |252 | 270 |341 |240 | |253 | 256 |342 |203 | |254 | 252 |343 |307 | |255 | 360 |344 |204 | |256 | 40 |345 |222 | |257 | 275 |346 |206 | |260 | 370 |347 |207 | |261 | 40 |350 |237 | |262 | 362 |351 |202 | |263 | 210 |352 |251 | |264 | 357 |353 |211 | |265-267 | 40 |354 |330 | |270 | 367 |355 |241 | |271 | 245 |356 |214 | |272 | 255 |357 |324 | |273 | 257 |360 |320 | |274 | 225 |361 |344 | |275 | 361 |362 |345 | |276 | 226 |363 |242 | |277 | 276 |364 |223 | |300 | 350 |365 |213 | |301 | 265 |366 |224 | |302 | 266 |367 |366 | |303 | 306 |370 |375 | |304 | 216 |371 |205 | |305 | 221 |372 |243 | |306 | 217 |374 |201 | |307 | 200 |375 |354 | |310 | 254 |376 |356 | +---------------+----------------+----------------+---------------+ MS 1250 to Mazovia For the conversion of MS 1250 to Mazovia, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | MS 1250 | Mazovia | MS 1250 | Mazovia | |200-213 | 40 |310-311 |40 | |214 | 230 |312 |220 | |215-216 | 40 |313-320 |40 | |217 | 240 |321 |245 | |220-233 | 40 |322 |40 | |234 | 236 |323 |243 | |235-236 | 40 |324-325 |40 | |237 | 246 |326 |231 | |240 | 377 |327-333 |40 | |241-242 | 40 |334 |232 | |243 | 234 |335-336 |40 | |244 | 40 |337 |341 | |245 | 217 |340-341 |40 | |246-252 | 40 |342 |203 | |253 | 256 |343 |40 | |254 | 252 |344 |204 | |255-256 | 40 |345 |40 | |257 | 241 |346 |215 | |260 | 370 |347 |207 | |261 | 361 |350 |40 | |262 | 40 |351 |202 | |263 | 222 |352 |221 | |264 | 40 |353 |211 | |265 | 346 |354-355 |40 | |266 | 40 |356 |214 | |267 | 372 |357-360 |40 | |270 | 40 |361 |244 | |271 | 206 |362 |40 | |272 | 40 |363 |242 | |273 | 257 |364 |223 | |274-276 | 40 |365 |40 | |277 | 247 |366 |224 | |300-303 | 40 |367 |366 | |304 | 216 |370-373 |40 | |305 | 40 |374 |201 | |306 | 225 |375-376 |40 | |307 | 200 | | | +---------------+----------------+----------------+---------------+ MS 1250 to DHN For the conversion of MS 1250 to DHN, all characters not in the following table are mapped unchanged. +-----------------------------------------------------------------+ | | Conversions|Performed | | | MS 1250 | DHN | MS 1250 | DHN | |200-213 | 40 |306 |201 | |214 | 206 |307-311 |40 | |215-216 | 40 |312 |202 | |217 | 207 |313-320 |40 | |220-233 | 40 |321 |204 | |234 | 217 |322 |40 | |235-236 | 40 |323 |205 | |237 | 220 |324-325 |40 | |240 | 377 |326 |231 | |241-242 | 40 |327-333 |40 | |243 | 203 |334 |232 | |244 | 40 |335-336 |40 | |245 | 200 |337 |341 | |246-252 | 40 |340 |40 | |253 | 256 |341 |240 | |254 | 252 |342-345 |40 | |255-256 | 40 |346 |212 | |257 | 210 |347-351 |40 | |260 | 370 |352 |213 | |261 | 361 |353-354 |40 | |262 | 40 |355 |241 | |263 | 214 |356-360 |40 | |264 | 40 |361 |215 | |265 | 346 |362 |40 | |266 | 40 |363 |216 | |267 | 372 |364 |223 | |270 | 40 |365 |40 | |271 | 211 |366 |224 | |272 | 40 |367 |366 | |273 | 257 |370-371 |40 | |274-276 | 40 |372 |243 | |277 | 221 |373-376 |40 | |300-305 | 40 | | | +---------------+----------------+----------------+---------------+ FILES
/usr/lib/iconv/*.so conversion modules /usr/lib/iconv/*.t conversion tables /usr/lib/iconv/iconv_data list of conversions supported by conversion tables SEE ALSO
iconv(1), iconv(3C), iconv(5) SunOS 5.10 18 Apr 1997 iconv_1250(5)