![]() |
|
|
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 read record by record from a file in unix | raoscb | UNIX for Dummies Questions & Answers | 1 | 05-16-2008 07:30 AM |
| Script to search a bad record in a file then put the record in the bad file | shilendrajadon | Shell Programming and Scripting | 2 | 12-28-2007 10:02 AM |
| Script to search a bad record in a file then put the record in the bad file | shilendrajadon | UNIX for Advanced & Expert Users | 1 | 12-28-2007 10:00 AM |
| merge two files in one file | nvkuriseti | Shell Programming and Scripting | 3 | 08-27-2007 07:06 AM |
| splitting a record and adding a record to a file | rsolap | Shell Programming and Scripting | 1 | 08-13-2007 02:58 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
MERGE 13 files and add the file name at the end of each record
Hi Gurus,
I have 13 comma(,) seperated files that i have to merge and create a single file which has file name attached at th end of each record in the out put file. Can any one please help me with writing a unix script with this issue? test1.dat BIG ID,Local ID,Bond Description,Liquidity,Maturity,Mat Sect,Price,Accr Int,Outs-Loc ,MVal-Loc,MVal-USD,MVal-EUR,Mac Dur,Mod Dur,Yield,Convexity,Coupon,Issue Date,Freq,ISIN AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,AT0000384938 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 test2.dat BIG ID,Local ID,Bond Description,Liquidity,Maturity,Mat Sect,Price,Accr Int,Outs-Loc ,MVal-Loc,MVal-USD,MVal-EUR,Mac Dur,Mod Dur,Yield,Convexity,Coupon,Issue Date,Freq,ISIN AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,AT0000384938 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 test3.dat BIG ID,Local ID,Bond Description,Liquidity,Maturity,Mat Sect,Price,Accr Int,Outs-Loc ,MVal-Loc,MVal-USD,MVal-EUR,Mac Dur,Mod Dur,Yield,Convexity,Coupon,Issue Date,Freq,ISIN AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,AT0000384938 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939 so on upto thirteen files my output neeeds to be outputfile.dat BIG ID,Local ID,Bond Description,Liquidity,Maturity,Mat Sect,Price,Accr Int,Outs-Loc ,MVal-Loc,MVal-USD,MVal-EUR,Mac Dur,Mod Dur,Yield,Convexity,Coupon,Issue Date,Freq,ISIN,FINENAME AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,AT0000384938,test1.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test1.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test1.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 3',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test1.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 6',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,AT0000384938,test2.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 6',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test2.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 6',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test2.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 6',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test2.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 8',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,AT0000384938,test3.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 8',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test3.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 8',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test3.dat AAA0024,BBB0024,sync 5.50% RAGB Jan 2010,Ben,15-Jan-2008,'1 - 8',101.075,2.87,8809.982,9157.532,14524.303,9157.532,1.427,1.363,4.703,3.205,5.5,22-Oct-1999,1,PT0000384939,test3.dat I appreciate if any one can help me with this issue. thanks vkr |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|