Sponsored Content
Operating Systems AIX combining two input text files Post 100494 by d3ck_tm on Tuesday 28th of February 2006 02:25:38 AM
Old 02-28-2006
combining two input text files

hi!

i would like to process two input text files

text1

9835023 20051004F2_011
9835021 20060904FAL0132006
8835099 20051004HOL011
8835044 20051004H1_011
6835023 20061002HAL0132006
4835099 20050721F1_011
4835088 20050906F1_011
4835044 20060905FAL0132006
4835023 20061001HAL0132006
4835021 20050816FAL011
3835023 20050707F1_011
2835021 20050531SM2011

text2

20050531SM2011
20050707F1_011
20050721F1_011
20050816FAL011
20050906F1_011
20051004F2_011
20051004H1_011
20051004HOL011

what i would like to happen is to combine those two, if text2 find its match in text1 (please see below)

final combination (output)

text3

9835023 20051004F2_011 20051004F2_011
9835021 20060904FAL0132006
8835099 20051004HOL011 20051004HOL011
8835044 20051004H1_011 20051004H1_011
6835023 20061002HAL0132006
4835099 20050721F1_011 20050721F1_011
4835088 20050906F1_011 20050906F1_011
4835044 20060905FAL0132006
4835023 20061001HAL0132006
4835021 20050816FAL011 20050816FAL011
3835023 20050707F1_011 20050707F1_011
2835021 20050531SM2011 20050531SM2011

i would like to know the proper coding for this
thanks for the help -->in advance
-d3ck_tm

Last edited by d3ck_tm; 02-28-2006 at 03:29 AM.. Reason: typographical error
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Merge text files while combining the multiple header/trailer records into one each.

Situation: Our system currently executes a job (COBOL Program) that generates an interface file to be sent to one of our vendors. Because this system processes information for over 100,000 employees/retirees (and growing), we'd like to multi-thread the job into processing-groups in order to... (4 Replies)
Discussion started by: oordonez
4 Replies

2. Shell Programming and Scripting

Combining two text lines into one

Here is the sample file: 646 STARTED Tue Dec 30 06:38:53 2008 Job DdCustXAddr_brad has been reset. 647 STARTED Tue Dec 30 06:38:54 2008 Starting Job DdCustXAddr_brad. (...) 704 STARTED Tue Dec 30 06:49:02 2008 Job DdCustXAddr_brad aborted. I want to combine every non-numbered line... (4 Replies)
Discussion started by: mfavero
4 Replies

3. Shell Programming and Scripting

Need help combining large number of text files

Hi, i have more than 1000 data files(.txt) like this first file format: 178.83 554.545 179.21 80.392 second file: 178.83 990.909 179.21 90.196 etc. I want to combine them to the following format: 178.83,554.545,990.909,... 179.21,80.392,90.196,... (7 Replies)
Discussion started by: mr_monocyte
7 Replies

4. Shell Programming and Scripting

shell script to take input from a text file and perform check on each servers and copy files

HI all, I want to script where all the server names will be in a text file like server1 server2 server3 . and the script should take servernames from a text file and perform copy of files if the files are not present on those servers.after which it should take next servername till the end of... (0 Replies)
Discussion started by: joseph.dmello
0 Replies

5. UNIX for Dummies Questions & Answers

Combining two text files as columns?

I have one space delimited file with multiple columns and one tab delimited file with multiple columns (They have the same number of rows). I want to basically combine these two text files into a new text file by column. How would I go about doing that? (1 Reply)
Discussion started by: evelibertine
1 Replies

6. Shell Programming and Scripting

Combining rows in a text file with a character limit

I have a file that contains several thousands rows. Here is an example. ^411912$ ^487267$ ^643776$ ^682249$ ^687737$ ^692328$ ^693767$ ^695483$ ^697289$ ^757411$ ^776688$ ^778953$ ^806123$ ^872262$ ^877877$ ^839837$ ^76666$ ^72018$ ^23330$ (3 Replies)
Discussion started by: justinb_155
3 Replies

7. UNIX for Dummies Questions & Answers

Need Help in reading N days files from a Directory & combining the files

Hi All, Request your expertise in tackling one requirement in my project,(i dont have much expertise in Shell Scripting). The requirement is as below, 1) We store the last run date of a process in a file. When the batch run the next time, it should read this file, get the last run date from... (1 Reply)
Discussion started by: dsfreddie
1 Replies

8. Shell Programming and Scripting

Formatting and combining fields of the input file

Hi, I have a file of the following format: AV 103 AV 104 AV 105 AV 308 AV 517 BN 210 BN 211 BN 212 BN 218 and the desired output is : AV 103-105 3 AV 308 1 AV 517 1 BN 210-212 3 (5 Replies)
Discussion started by: rochitsharma
5 Replies

9. Shell Programming and Scripting

Copying a file to multiple other files using a text file as input

Hello, I have a file called COMPLIST as follows that contains 4 digit numbers.0002 0003 0010 0013 0015 0016 0022 0023 0024 0025 0027 0030 0031 0032 0033 0035 0038 0041 (3 Replies)
Discussion started by: sph90457
3 Replies

10. UNIX for Beginners Questions & Answers

Modifying/combining two text outputs

greetings, I have what seems to be a fairly complex task at hand. I am dealing with 3 outputs from a database. a) Listing of tables. The first 3 characters are always an identifier of an application. See in part b - Example- select tablename from system.tables ABC1 ABC2 RFV1 ... (2 Replies)
Discussion started by: jeffs42885
2 Replies
XML::TMX::Writer(3pm)					User Contributed Perl Documentation				     XML::TMX::Writer(3pm)

NAME
XML::TMX::Writer - Perl extension for writing TMX files SYNOPSIS
use XML::TMX::Writer; my $tmx = new XML::TMX::Writer(); $tmx->start_tmx(id => 'paulojjs'); $tmx->add_tu(SRCLANG => 'en', 'en' => 'some text', 'pt' => 'algum texto'); $tmx->add_tu(SRCLANG => 'en', 'en' => 'some text', 'pt' => 'algum texto', -note => [32, 34 ], -prop => { q => 23, aut => "jj"} ); $tmx->end_tmx(); DESCRIPTION
This module provides a simple way for writing TMX files. METHODS
The following methods are available: new $tmx = new XML::TMX::Writer(); Creates a new XML::TMX::Writer object start_tmx $tmx->start_tmx(-output => 'some_file.tmx'); Begins a TMX file. Several options are available: -output Output of the TMX, if none is defined stdout is used by default. tool Tool used to create the TMX. Defaults to 'XML::TMX::Writer' toolversion Some version identification of the tool used to create the TMX. Defaults to the current module version segtype Segment type used in the <tu> elements. Possible values are block, paragraph, sentence and phrase. Defaults to sentence. srctmf Specifies the format of the translation memory file from which the TMX document or segment thereof have been generated. adminlang Specifies the default language for the administrative and informative elements <note> and <prop>. srclang Specifies the language of the source text. If a <tu> element does not have a srclang attribute specified, it uses the one defined in the <header> element. Defaults to *all*. datatype Specifies the type of data contained in the element. Depending on that type, you may apply different processes to the data. The recommended values for the datatype attribute are as follow (this list is not exhaustive): unknown undefined alptext WinJoust data cdf Channel Definition Format cmx Corel CMX Format cpp C and C++ style text hptag HP-Tag html HTML, DHTML, etc interleaf Interleaf documents ipf IPF/BookMaster java Java, source and property files javascript JavaScript, ECMAScript scripts lisp Lisp mif Framemaker MIF, MML, etc opentag OpenTag data pascal Pascal, Delphi style text plaintext Plain text (default) pm PageMaker rtf Rich Text Format sgml SGML stf-f S-Tagger for FrameMaker stf-i S-Tagger for Interleaf transit Transit data vbscript Visual Basic scripts winres Windows resources from RC, DLL, EXE xml XML xptag Quark XPressTag srcencoding All TMX documents are in Unicode. However, it is sometimes useful to know what code set was used to encode text that was converted to Unicode for purposes of interchange. This option specifies the original or preferred code set of the data of the element in case it is to be re-encoded in a non-Unicode code set. Defaults to none. id Specifies the identifier of the user who created the element. Defaults to none. -note A reference to a list of notes to be added in the header. -prop A reference fo a hash of properties to be added in the header. Keys are used as the "type" attribute, value as the tag contents. add_tu $tmx->add_tu(srclang => LANG1, LANG1 => 'text1', LANG2 => 'text2'); $tmx->add_tu(srclang => LANG1, LANG1 => 'text1', LANG2 => 'text2', -note => ["value1", ## notes "value2"], -prop => { type1 => ["value1","value"], #multiple values _ => 'value2', # anonymound properties typen => ["valuen"],} ); Adds a translation unit to the TMX file. Several optional labels can be specified: id Specifies an identifier for the <tu> element. Its value is not defined by the standard (it could be unique or not, numeric or alphanumeric, etc.). srcencoding Same meaning as told in start_tmx method. datatype Same meaning as told in start_tmx method. segtype Same meaning as told in start_tmx method. srclang Same meaning as told in start_tmx method. end_tmx $tmx->end_tmx(); Ends the TMX file, closing file handles if necessary. SEE ALSO
TMX Specification <http://www.lisa.org/tmx/tmx.htm> AUTHOR
Paulo Jorge Jesus Silva, <paulojjs@bragatel.pt> Alberto Simo~es, <albie@alfarrabio.di.uminho.pt> COPYRIGHT AND LICENSE
Copyright 2003 by Projecto Natura This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-05 XML::TMX::Writer(3pm)
All times are GMT -4. The time now is 10:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy