![]() |
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 |
| how to merge these two files? | fedora | Shell Programming and Scripting | 3 | 02-12-2008 06:45 PM |
| merge files | koti_rama | Shell Programming and Scripting | 5 | 12-24-2007 10:59 PM |
| use of sed over cat to merge files | miwinter | UNIX for Advanced & Expert Users | 2 | 11-28-2007 01:36 PM |
| How to merge files | lestat_ecuador | Shell Programming and Scripting | 3 | 06-07-2007 06:45 AM |
| help in merge files | u263066 | Shell Programming and Scripting | 5 | 07-24-2006 03:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
merge two files in one file
All,
I've basic knowlege on understanding UNIX Shell Programming. Right now I need to write a script for the following requirement. Kindly help me or suggest me how to write a Shell script. I've 8 .csv files that are containing "Detail" records. Each file getting more than 1 million. Another eight files (.csv) are containing only one "Header" in each file. Now I want to MERGE these <Header> and <Detail> records in one file in the below format: tstVenkat1.csv This is Header Record This is Detail Record This is Detail Record . . . . tstVenkat8.csv This is Header Record This is Detail Record This is Detail Record For <Header> record the file naming convention as tst1Venkat.xml and for <Detail> records the file naming convention as tstVenkat1.xml From the above, want to send tst1Venkat.xml (ie., Detail records) to tstVenkat1.xml (ie., Header record containing here and it must be the first line in this file). Kindly help to write in a shell script. Thank you! - Venkat |
|
||||
|
cat <<header file>> <<detail file>> > <<new file>>
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|