The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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 05:40 PM
input from a file into an expect script ? starsky Shell Programming and Scripting 2 04-16-2008 12:38 PM
File as input for a script innocentspirit Shell Programming and Scripting 5 10-26-2007 01:03 AM
Script for reading an input file gzs553 Shell Programming and Scripting 1 10-17-2006 07:55 AM
file as input for script finster Shell Programming and Scripting 1 11-11-2004 06:27 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-16-2008
forumsgr forumsgr is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 3
Red face Parshing script using input from a file to another

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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0