Sponsored Content
Full Discussion: Merging of rows
Top Forums Shell Programming and Scripting Merging of rows Post 302273619 by ssachins on Monday 5th of January 2009 10:37:38 AM
Old 01-05-2009
Checking of word 'Type'

Hi,
I forgot to ask, How this script will check whether the next line starts with word 'Type|' and if it is then should not merge with first row.

*When I ran the script, its concating both the lines mentioned below which should not happen. (these lines should not merge)

Type|Cash|TradeID|Funding Cash|SystemID|AA6192|SourceSystem|
Type|Cash|TradeID|Funding Cash|SystemID|BTB59029|SourceSystem|
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Deleting specific rows in large files having rows greater than 100000

Hi Guys, I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language the text file contains data in a pipe delimited format sdfsdfs sdfsdfsd START_ROW sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
Discussion started by: manish2009
9 Replies

2. Shell Programming and Scripting

Split single rows to multiple rows ..

Hi pls help me out to short out this problem rm PAB113_011.out rm: PAB113_011.out: override protection 644 (yes/no)? n If i give y it remove the file. But i added the rm command as a part of ksh file and i tried to remove the file. Its not removing and the the file prompting as... (7 Replies)
Discussion started by: sri_aue
7 Replies

3. Shell Programming and Scripting

Merging rows with same column 1 value

I have the following space-delimited input: 1 11.785710 117.857100 1 15 150 1 20 200 1 25 250 3 2.142855 21.428550 3 25 250 22 1.071435 10.714350 The first field is the ID number, the second field is the percentage of the total points that the person has and the third column is the number... (3 Replies)
Discussion started by: mdlloyd7
3 Replies

4. UNIX for Dummies Questions & Answers

merging rows into new file based on rows and first column

I have 2 files, file01= 7 columns, row unknown (but few) file02= 7 columns, row unknown (but many) now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there e.g. file 01 James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies

5. UNIX Desktop Questions & Answers

merging files and add missing rows

hello all, I have files that have a specific way for naming the first column they are make of five names in Pattern of 3 Y = (no case sensitive) so the files are names $Y-$Y-$Y or $X-$Y-$Z depending how we look they only exist of the pattern exist now I want to create a file from them that... (9 Replies)
Discussion started by: A-V
9 Replies

6. Shell Programming and Scripting

Merging rows using two common rows.

Hi.. My requirement is simple but unable to get that.. File 1 : 3 415 A G 4 421 G . 39 421 G A 2 421 G A,C 41 427 A . 4 427 A C 42 436 G . 3 436 G C 43 445 C . 2 445 C T 41 447 A . Output (4 Replies)
Discussion started by: empyrean
4 Replies

7. Shell Programming and Scripting

Merging rows in awk

Hello, I have a data format as follows: Ind1 0 1 2 Ind1 0 2 1 Ind2 1 1 0 Ind2 2 2 0 I want to use AWK to have this output: Ind1 00 12 21 Ind2 12 12 00 That is to merge each two rows with the same row names. Thank you very much in advance for your help. (8 Replies)
Discussion started by: Homa
8 Replies

8. Shell Programming and Scripting

Moving or copying first rows and last rows into another file

Hi I would like to move the first 1000 rows of my file into an output file and then move the last 1000 rows into another output file. Any help would be great Thanks (6 Replies)
Discussion started by: kylle345
6 Replies

9. Shell Programming and Scripting

Merging rows after matching a pattern

Hi All, I have the below file where I want the lines to merged based on a pattern. AFTER CMMILAOJ CMMILAAJ AFTER CMDROPEJ CMMIMVIJ CMMIRNTJ CMMIRNRJ CMMIRNWJ CMMIRNAJ CMMIRNDJ AFTER CMMIRNTJ CMMIRNRJ CMMIRNWJ (4 Replies)
Discussion started by: varun22486
4 Replies

10. UNIX for Beginners Questions & Answers

Merging rows based on same ID in First column.

Hellow, I have a tab-delimited file with 3 columns : BINPACKER.13259.1.p2 SSF48239 BINPACKER.13259.1.p2 PF13243 BINPACKER.13259.1.p2 G3DSA:1.50.10.20 BINPACKER.13259.2.p2 SSF48239 BINPACKER.13259.2.p2 PF13243 BINPACKER.13259.2.p2 G3DSA:1.50.10.20... (7 Replies)
Discussion started by: anjaliANJALI
7 Replies
DTAUS(5)																  DTAUS(5)

NAME
dtaus - Converter for DTAUS files DESCRIPTION
The dtaus(1) program reads and writes German DTAUS files. DTAUS is an semi-acronym for DatenTragerAUStausch. It is used by German credit institutes in order to implement money exchanges between accounts and credit institutes. These files are always called DTAUS0.TXT. Since they are shipped in a weird ascii format that is not quite readable and writable for human beings a special control format was invented. The dtaus(1) program reads and writes such a control file and generates a proper DTAUS file if requested or decodes one. CONTROL FILE
The control file implements a very simple format which was invented only for use with the dtaus(1) program. Like with many *nix configura- tion files empty lines and those beginning with a hash mark (``#'') are ignored. The remaining file is splitted into three major parts: one BEGIN record (representing the A record), several regular records (representing C records) and one optional END record (representing the E record), which is ignored when the control file is read but is extracted from the bank file if one is decoded. Here's a short sample for a control file: BEGIN { Art type Name Martin Schulze Konto 123545 BLZ 2004002 Ausfuehrung 23.12.2001 Euro } { Transaktion transaction Name Martha Schulze Konto 98832 BLZ 2004003 Betrag 20.00 Zweck Gebuhr Wohnheimnetz Text AnschluB u. 11+12.97 } ... Please note that several field names are used in both the BEGIN and the regular record. When used in the BEGIN record they denote your name and your bank account. When used in a regular record they are affiliated with your customers data. You may use up to 15 fields entitled as Text. They will be recorded one by one and stored into additional data records using the same order. This way you could add a detailed description of the type of money transfer if you like. The contents of the field Zweck are most probably what the customer will see on their bank statements. The field Ausfuehrung is optional and denotes the day when the entire transaction should be processed. The date has to be given as DD.MM.YYYY and will be translated into the resulting bank file literally. It may not be younger than the creation date of the file which will automatically be inserted by dtaus(1). The processing date also may not be more than 15 years later than the creation date. Explanation of type One of the following: LK Lastschrift Kundenseitig GK Gutschrift Kundenseitig LB Lastschrift Bankseitig GB Gutschrift Bankseitig Explanation of transaction One of the following: Einzug Bankeinzug Gutschrift Uberweisung Vermogen [JJJJ] Vermogenswirksame Leistung mit Sparzulage. Als Argument kann das Jahr angegeben werden, fur das diese Leistung gilt. Wenn es weggelassen, wird, verwendet dtaus das aktuelle Jahr. Vom Jahr wird nur die letzte Ziffer verwendet, es muB daher auch nicht vollstandig angegeben werden. Vermoegen [JJJJ] Wie Vermogen, jedoch ohne Umlaut. E-Cash Lastschrift aus Verfugung im elecctronic Cash-System E-Cash-A Lastschrift aus Verfugung im elecctronic Cash-System mit auslandischer Karte. You may only use one of these for the entire file. You are not allowed to switch between Einzug and Gutschrift within the same file. If you require the credit institute to process both types, you'll have to provide two separate diskettes. Support for Euro From January 1st 2002 the currency in many European countries, Germany is among these, changes to Euro. Hence, money transfer changes from DM (formerly known as ``Deutsche Mark'') to Euro. The format specification of DTAUS was meant for DM but was modified in 2001 to support Euro as well. The current version of dtaus(1) supports both currencies. It defaults to using Euro, however. To switch to DM, simply add the keyword DM (or Euro respectively if this version was compiled without Euro support as default) to the BEGIN record. If no currency keyword is given, the compiled in decides (upstream source defaults to Euro). Character Encoding German Umlauts are converted into two 7-bit characters on the fly so you don't need to care about them. Since the DTAUS0.TXT file only uses uppercase letters every text is also converted to uppercase. Except for the way records are delimited the format should be self explanatory. SEE ALSO
dtaus(1). DTAUS files use a special but simple and publically documented format. It is included in the distribution of dtaus(1) as dtaus.txt. 17 November 2001 DTAUS(5)
All times are GMT -4. The time now is 09:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy