![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading from while loop into an array | ssuresh1999 | UNIX for Dummies Questions & Answers | 2 | 08-12-2008 11:53 AM |
| problem in reading inside a while loop | ssuresh1999 | UNIX for Dummies Questions & Answers | 3 | 08-07-2008 09:53 AM |
| Reading from a specific line in a loop | kaushikraman | Shell Programming and Scripting | 3 | 07-24-2008 05:49 AM |
| reading from within the loop --std i/p problem | mobydick | Shell Programming and Scripting | 2 | 07-11-2008 08:42 PM |
| Reading 5 Students names and grades using while loop???? | dlbomber1 | Shell Programming and Scripting | 1 | 11-26-2007 02:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
hi
i have two files cat input.txt 123456| 43256 456482|5893242 cat data.txt xv 123456 abcd dsk sd 123456 afsfn dd df 43256 asdf ff ss 456482 aa sf 5893242 ff ff aa 5893242 aa aa i need to read inputs from input.txt and find data for data.txt. then i need to print them as a table as belw (if we took 1st line from input) 123456 | 43256 |xv 123456 abcd dsk | df 43256 asdf ff | |sd 123456 afsfn dd | ss 456482 aa but i couldnt do it. Pleas help i have the below script Quote:
Last edited by windows; 08-19-2008 at 04:26 AM.. |
|
||||
|
Thank you dear otheus
it worked fine. I did it without ' head -1' since i need all the matches for both $a and $b BUT.. if $a has more than 1 match in data.txt, it wont be printed in tablular form. I need to export the results to Excel so the can more proccessed further. lets say from data.txt we have more than 1 line matching $a, and output will be: Quote:
Quote:
so i can use text wizard in Excel to import it and keep it inshape. Hope u got my point |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|