Help in awk/bash
Hi, I am also a newbie in awk and trying to find solution of my problem.
I have one reference file 1.txt with 2 columns and I want to search other 10 files (a.txt, b.txt......h.txt each with 5 columns) corresponding to the values of 2nd column from 1.txt. If the value from 2nd column from 1.txt matches with the value of 4th column of 10 files, then print the row as well as file name.
Also, in 1.txt for eg. 1st value is -191.632 but originally in a.txt it is -191.6318, so I also want to print values same upto two decimal places and rest places can be any number.
1.35732 -191.632 1.36229 -190.8716 1.35503 -191.3254 1.35597 -191.2652
271640.000 0.49000 -0.0000036574 -191.6318 -183.82380 271650.000 0.49155 0.0000033909 -198.30111 -198.73140 271660.000 0.48775 0.0000014657 -191.3254 -199.84910 271670.000 0.48212 -0.0000004152 -195.48446 -193.15580
Last edited by joeyg; 12-28-2012 at 08:43 PM.. Reason: Double post. Closed.
|Thread Tools||Search this Thread|
|More UNIX and Linux Forum Topics You Might Find Helpful|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Help in awk/bash||bioinfo||Shell Programming and Scripting||33||01-10-2013 01:08 PM|
|AWK/Bash script||chrisjorg||Shell Programming and Scripting||3||05-10-2012 12:48 PM|
|scripting help with bash and awk||garethsays||Shell Programming and Scripting||3||05-30-2009 10:18 AM|
|awk bash help||a-gopal||Shell Programming and Scripting||2||05-08-2009 08:39 PM|
|BASH with AWK||narasimhulu||Shell Programming and Scripting||2||08-25-2008 11:59 PM|