Sponsored Content
Top Forums Shell Programming and Scripting Split one file to Multiple file with report basis in unix Post 302493748 by krbala1985 on Thursday 3rd of February 2011 03:16:36 PM
Old 02-03-2011
Hi ,Thanks for writing me...

i want the report file like below from 11020111.CLT.

MUMBAI0001.txt
Code:
%sAEGONCA| |MUMBAI | :EXPC|N|D
 
DRAWEE LOC.NAME|DEPOSIT DATE|ACTIVATION DATE|DAY|AMOUNT|CLIENT CODE|PRODUCT|CBP.NO|EXP.CLEARING DATE
MUMBAI|29/01/2011|29/01/2011|Tue| 21643.00|AEGONCA|aaaa|110290361013 |01/02/2011
MUMBAI|29/01/2011|29/01/2011|Tue| 142.00|AEGONCA|aaaa|110290361014 |01/02/2011
BHUBANESHWAR (ORI.)|31/01/2011|31/01/2011|Tue| 70751.00|AEGONCA|CCLR|110310758005 |01/02/2011
ERNAKULAM (KERALA)|31/01/2011|31/01/2011|Tue| 68980.00|AEGONCA|CCLR|110310905015 |01/02/2011
AHMEDABAD|31/01/2011|31/01/2011|Tue| 108000.00|AEGONCA|aaaa|110310924024 |01/02/2011
BHOPAL (M.P.)|31/01/2011|31/01/2011|Tue| 97832.00|AEGONCA|aaaa|110310959001 |01/02/2011
%eAEGONCA| |MUMBAI | :EXPC

MUMBAI002.TXT
Code:
%sAGENTCA| |MUMBAI | :EXPC|N|D
DRAWEE LOC.NAME|DEPOSIT DATE|ACTIVATION DATE|DAY|AMOUNT|CLIENT CODE|PRODUCT|CBP.NO|EXP.CLEARING DATE
UDIPI(KAR) CASH|31/01/2011|31/01/2011|Tue| 250.00|AGENTCA|aaaa|110310667003 |01/02/2011
MANGALORE(KAR) CASH|31/01/2011|31/01/2011|Tue| 350.00|AGENTCA|aaaa|110310839008 |01/02/2011
ERNAKULAM (KERALA)|31/01/2011|31/01/2011|Tue| 250.00|AGENTCA|aaaa|110310905004 |01/02/2011
ERNAKULAM (KERALA)|31/01/2011|31/01/2011|Tue| 600.00|AGENTCA|aaaa|110310905005 |01/02/2011
ERNAKULAM (KERALA)|31/01/2011|31/01/2011|Tue| 1500.00|AGENTCA|aaaa|110310905006 |01/02/2011
%eAGENTCA| |MUMBAI | :EXPC
 
%sAGENTCA| |MUMBAI | :EXPC|Y|D
DRAWEE LOC.NAME|DEPOSIT DATE|ACTIVATION DATE|DAY|AMOUNT|CLIENT CODE|PRODUCT|CBP.NO|EXP.CLEARING DATE
UDIPI(KAR) CASH|31/01/2011|31/01/2011|Tue| 2502.00|AGENTCA|aaaa|110310667003 |01/02/2011
MANGALORE(KAR) CASH|31/01/2011|31/01/2011|Tue| 3050.00|AGENTCA|aaaa|110310839008 |01/02/2011
ERNAKULAM (KERALA)|31/01/2011|31/01/2011|Tue| 2250.00|AGENTCA|aaaa|110310905004 |01/02/2011
ERNAKULAM (KERALA)|31/01/2011|31/01/2011|Tue| 600.00|AGENTCA|aaaa|110310905005 |01/02/2011
ERNAKULAM (KERALA)|31/01/2011|31/01/2011|Tue| 1520.00|AGENTCA|aaaa|110310905006 |01/02/2011
%eAGENTCA| |MUMBAI | :EXPC

MUMBAI003.TXT
Code:
%sPFRDAXX| |MUMBAI | :EXPC|N|D
 
DRAWEE LOC.NAME|DEPOSIT DATE|ACTIVATION DATE|DAY|AMOUNT|CLIENT CODE|PRODUCT|CBP.NO|EXP.CLEARING DATE
CALCUTTA|31/01/2011|31/01/2011|Tue| 15000.00|PFRDAXX|aaaa|110311499006 |01/02/2011
%ePFRDAXX| |MUMBAI | :EXPC

PLEASE HELP ON THIS. thanks in advance.Smilie

---------- Post updated at 03:16 PM ---------- Previous update was at 03:12 PM ----------

This script is not working...pls help

Last edited by Scott; 02-06-2011 at 10:53 AM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with split the file content into multiple different file

Input file content: NA_10001 XA_10081 NG_10015 AC_1321.1 . . Desired output file: ls *.txt NA_10001.txt XA_10081.txt NG_10015.txt AC_1321.1.txt cat NA_10001.txt NA_10001 cat XA_10081.txt XA_10081 (1 Reply)
Discussion started by: perl_beginner
1 Replies

2. Shell Programming and Scripting

Help with split one file content into multiple different file

Input file: cat input_file.txt data_1 2342 data_3 242 data_1 3546 data_5 458 data_10 342 data_30 42 data_10 346 content_50 48 content_1 2343 Desired output: cat output_file1.txt data_1 2342 data_3 242 data_1 3546 data_5 458 (2 Replies)
Discussion started by: perl_beginner
2 Replies

3. Shell Programming and Scripting

Split file in unix into multiple files

Hi Gurus I have to split the incoming source file into multiple file. File contains some unwanted XML tags also . Files looks like some XML tags FILEHEADERABC 12 -- --- ---- EOF some xml tags xxxFILEHEADERABC 13 -- --- ---- EOF I have to ignore XML tags and only split file... (6 Replies)
Discussion started by: manish2608
6 Replies

4. Shell Programming and Scripting

Split a file into multiple files based on first two digits of file.

Hi , I do have a fixedwidth flatfile that has data for 10 different datasets each identified by the first two digits in the flatfile. 01 in the first two digit position refers to Set A 02 in the first two digit position refers to Set B and so on I want to genrate 10 different files from my... (6 Replies)
Discussion started by: okkadu
6 Replies

5. Shell Programming and Scripting

How to split file into multiple files using awk based on 1 field in the file?

Good day all I need some helps, say that I have data like below, each field separated by a tab DATE NAME ADDRESS 15/7/2012 LX a.b.c 15/7/2012 LX1 a.b.c 16/7/2012 AB a.b.c 16/7/2012 AB2 a.b.c 15/7/2012 LX2 a.b.c... (2 Replies)
Discussion started by: alexyyw
2 Replies

6. Shell Programming and Scripting

Splitting XML file on basis of line number into multiple file

Hi All, I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom. from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
Discussion started by: ajju
14 Replies

7. Linux

Split a large textfile (one file) into multiple file to base on ^L

Hi, Anyone can help, I have a large textfile (one file), and I need to split into multiple file to break each file into ^L. My textfile ========== abc company abc address abc contact ^L my company my address my contact my skills ^L your company your address ========== (3 Replies)
Discussion started by: fspalero
3 Replies

8. UNIX for Beginners Questions & Answers

Split a txt file on the basis of line number

I have to split a file containing 100 lines to 5 files say from lines ,1-20 ,21-30 ,31-40 ,51-60 ,61-100 Here is i can do it for 2 file but how to handle it for more than 2 files awk 'NR < 21{ print >> "a"; next } {print >> "b" }' $input_file Please advidse. Thanks (4 Replies)
Discussion started by: abhaydas
4 Replies

9. UNIX for Beginners Questions & Answers

Split large file into 24 small files on one hour basis

I Have a large file with 24hrs log in the below format.i need to split the large file in to 24 small files on one hour based.i.e ex:from 09:55 to 10:55,10:55-11:55 can any one help me on this.! ... (20 Replies)
Discussion started by: Raghuram717
20 Replies

10. UNIX for Beginners Questions & Answers

Split into multiple files by using Unique columns in a UNIX file

I have requirement to split below file (sample.csv) into multiple files by using the unique columns (first 3 are unique columns) sample.csv 123|22|56789|ABCDEF|12AB34|2019-07-10|2019-07-10|443.3400|1|1 123|12|5679|BCDEFG|34CD56|2019-07-10|2019-07-10|896.7200|1|2... (3 Replies)
Discussion started by: RVSP
3 Replies
MYSQLBUG(1)						       MySQL Database System						       MYSQLBUG(1)

NAME
mysqlbug - generate bug report SYNOPSIS
mysqlbug DESCRIPTION
This program enables you to generate a bug report and send it to Oracle Corporation. It is a shell script and runs on Unix. The normal way to report bugs is to visit http://bugs.mysql.com/, which is the address for our bugs database. This database is public and can be browsed and searched by anyone. If you log in to the system, you can enter new reports. If you have no Web access, you can generate a bug report by using the mysqlbug script. mysqlbug helps you generate a report by determining much of the following information automatically, but if something important is missing, please include it with your message. mysqlbug can be found in the scripts directory (source distribution) and in the bin directory under your MySQL installation directory (binary distribution). Invoke mysqlbug without arguments: shell> mysqlbug The script will place you in an editor with a copy of the report to be sent. Edit the lines near the beginning that indicate the nature of the problem. Then write the file to save your changes, quit the editor, and mysqlbug will send the report by email. COPYRIGHT
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR
Sun Microsystems, Inc. (http://www.mysql.com/). MySQL 5.1 04/06/2010 MYSQLBUG(1)
All times are GMT -4. The time now is 01:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy