![]() |
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 |
| Adding new line at the end of file | somesh_p | Shell Programming and Scripting | 5 | 11-05-2007 05:47 PM |
| How to add filename to the end of each line in file | tmikahan | Shell Programming and Scripting | 2 | 05-08-2007 05:24 AM |
| adding a line to a file | andy2000 | Shell Programming and Scripting | 2 | 03-26-2007 08:44 AM |
| Adding filename into file content | missutoomuch | Shell Programming and Scripting | 1 | 11-11-2005 04:02 PM |
| How to adding the filename into file contents | missutoomuch | Shell Programming and Scripting | 2 | 11-11-2005 05:26 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Grabing Date from filename and adding to the end of each line in the file.
Hi,
I have 24 .dat files something like below. The file name starts with abc followed by two digit month and two digit year. Is there a way to grab the month and year from each filename and append it to the end of each line. Once this is done I want to combine all the files into file Master.dat file. All files are fixed width abc0103.dat abc0203.dat ..and so on . abc1203.dat abc0104.dat .and so on till .. abc1204.dat All files are fixed width and the layout is as below Field1.... HNUM CHARACTER 1 to 10 Field2.... AKEY CHARACTER 11 to 20 Field3.... BNC CHARACTER 21 to 23 Field4.... AMOUNT NUMERIC 24 to 28 Field5.... BUSS CHARACTER 29 to 29 I want to grab the month and year from each filename and append at the end of each line to the respective files. and create a master.dat file. I will appreciate any help on this. Thanks Raj Last edited by reborg; 05-01-2007 at 07:50 PM.. Reason: please do not shout in the forums --reborg |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|