![]() |
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 |
| Expect script with file input problems | meberline | Shell Programming and Scripting | 1 | 05-29-2008 04:40 PM |
| input from a file into an expect script ? | starsky | Shell Programming and Scripting | 2 | 04-16-2008 11:38 AM |
| File as input for a script | innocentspirit | Shell Programming and Scripting | 5 | 10-26-2007 12:03 AM |
| Script for reading an input file | gzs553 | Shell Programming and Scripting | 1 | 10-17-2006 06:55 AM |
| file as input for script | finster | Shell Programming and Scripting | 1 | 11-11-2004 06:27 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi all
As quite newbie in shell scripting i need your help. The case: two files with question mark delimeter: file1.txt: A; B; D; E; file2.txt: a,antonis,red; b,maria,green; c,george,blue; d,jack,red; e,Helen,yellow; k,konstantin,black; I need an effiecient way of parsing while it will read the file1.txt as input to the file2.txt and produce a file3.txt with the following results, in order to be able also to count the lines of the results: file3.txt: a,antonis,red; b,maria,green; d,jack,red; e,Helen,yellow; I was thinking some "for loop" but since file1.txt will be from hundren to some thousand of entries and file2.txt is almost a million lines to look into, this serial way will take ages (if the server will not crushed eventually ).Any help is more than welcome. I am working on Solaris 9 or 10 if that helps. BR CJ |
|
||||
|
Unfortunatelly I am to old for school and there is almost a year since my last script.
i kow that i have to use awk and probably sed with substr defining the delimeter, but all the post I checked are talking either for fixed number of lines using AWK NF or fixed lenght of string. Trully sorry for the inconvience... |
| Sponsored Links | ||
|
|