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
combine multiple .xl file bikas_jena Shell Programming and Scripting 4 12-11-2007 04:12 PM
sed, grep, cut or combine? maskot Shell Programming and Scripting 4 01-10-2007 10:46 AM
combine two files fredao1 Shell Programming and Scripting 1 01-08-2007 09:29 PM
Combine two lines superprg UNIX for Dummies Questions & Answers 10 02-01-2006 08:47 AM
how to combine two files tao UNIX for Dummies Questions & Answers 4 03-21-2002 10:38 PM

 
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 03-02-2006
sabercats sabercats is offline
Registered User
  
 

Join Date: Feb 2006
Posts: 66
Combine file

Hi all,

If I have 4 kind of files , and each file have different date, all of them are flat file and have the same 4 fields
Date|ID|Class|City

english.20060228.dat
02/28/2006|ABC|ENG|San Tomas
02/28/2006|BCD|ENG|San Jone
02/28/2006|AFD|ENG|San Luis
02/28/2006|ADD|ENG|San Mateo

english.20060227.dat
02/27/2006|ABC|MTH|San Tomas
02/27/2006|BBD|ENG|San Jone
02/27/2006|HFD|ENG|San Luis
02/27/2006|RRR|PHY|San Mateo


Spanish.20060228.dat
02/28/2006|AXC|ENG|San Tomas
02/28/2006|BXD|ENG|San Jone
02/28/2006|AXD|ENG|San Luis
02/28/2006|AXD|ENG|San Mateo

Spanish.20060227.dat
02/27/2006|ANC|SPASan Tomas
02/27/2006|BND|HUH|San Jone
02/27/2006|AND|WEL|San Luis
02/27/2006|AND|TET|San Mateo


france.20060228.dat
02/28/2006|AMC|EWW|San Tomas
02/28/2006|BMD|WRE|San Jone
02/28/2006|AMD|RGG|San Luis
02/28/2006|AMD|EWW|San Mateo

france.20060227.dat
02/27/2006|QYQ|MTH|San Tomas
02/27/2006|BYD|ENG|San Jone
02/27/2006|AYD|ENG|San Luis
02/27/2006|AYD|PHY|San Mateo


Dummy.20060228.dat
02/28/2006|AKC|ENGD|San Tomas
02/28/2006|BKD|ENGD|San Jone
02/28/2006|AKD|ENGD|San Luis
02/28/2006|AKD|ENGD|San Mateo

Dummy.20060227.dat
02/27/2006|AIC|MTHD2|San Tomas
02/27/2006|BID|ENGD2|San Jone
02/27/2006|AID|ENGD2|San Luis
02/27/2006|AID|PHYD2|San Mateo

how do I write a code to combine all file english*.dat , spanish*.dat , france*.dat NOT DUMMY.dat and it should have combine.date.log and combine.date2.log ( and new containt sort by ID and CLASS).... like combine.20060227.log , combine.20060228.log

How it can go to this directory and do in one script ??
can we do it in korn shell ?

Thanks

Last edited by sabercats; 03-02-2006 at 04:54 PM..
 

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 03:04 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