Sponsored Content
Full Discussion: Joining Three Files
Top Forums Shell Programming and Scripting Joining Three Files Post 302546436 by mac4rfree on Thursday 11th of August 2011 08:28:02 AM
Old 08-11-2011
Quote:
First file

Name TransactionID StoreID CustomerID RegTransr TransactionCode
StoreCENTER 620499 1238 12380005080811100000 1619 1501
StoreCENTER 620500 1238 12380005080811100000 1620 1501
StoreCENTER 634956 557 3243 1
StoreCENTER 620501 1238 8871 2
StoreCENTER 634957 557 3244 1
StoreCENTER 1030086 625 8979 1
StoreCENTER 620507 1238 4200 1
StoreCENTER 1030087 625 8980 1
StoreCENTER 620508 1238 8874 2
StoreCENTER 620511 1238 4201 1
StoreCENTER 620512 1238 12380005080811100000 1625 1501

Second File
TransactionID StoreID SequenceID
620499 1238 1
620500 1238 1
620512 1238 1
620528 1238 1
620535 1238 1
620543 1238 1
620545 1238 1

Output File
Name TransactionID StoreID CustomerID RegTransr TransactionCode SequenceID
StoreCENTER 620499 1238 12380005080811100000 1619 1501 1
StoreCENTER 620500 1238 12380005080811100000 1620 1501 1
StoreCENTER 634956 557 3243 1
StoreCENTER 620501 1238 8871 2
StoreCENTER 634957 557 3244 1
StoreCENTER 1030086 625 8979 1
StoreCENTER 620507 1238 4200 1
StoreCENTER 1030087 625 8980 1
StoreCENTER 620508 1238 8874 2
StoreCENTER 620511 1238 4201 1
StoreCENTER 620512 1238 12380005080811100000 1625 1501 1
Files are joined by TransactionCode(Second Column after StoreCENTER) and StoreID (next Column) . The Last column from the output is coming from Second file
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

joining 2 files

Hi, I have two files that I need to find difference between. Do I use diff or join? If join, how do I use it? thanks, webtekie (1 Reply)
Discussion started by: webtekie
1 Replies

2. UNIX for Dummies Questions & Answers

joining files

Hi, Could anyone help me ? I'm trying to join two files, but no common field are on them. So I think on generate \000\ sequence to add for each line on both files, so then will be able to join these files. Any idea? Thanks in advance, (2 Replies)
Discussion started by: Manu
2 Replies

3. Shell Programming and Scripting

Help with joining two files

Greetings, all. I've got a project that requires I join two data files together, then do some processing and output. Everything must be done in a shell script, using standard unix tools. The files look like the following: File_1 Layout: Acct#,Subacct#,Descrip Sample: ... (3 Replies)
Discussion started by: rjlohman
3 Replies

4. Shell Programming and Scripting

Joining files

Hi, Whats the unix function to join multiple files? is it cat? so I have multiple files in the same format and I want to join then by row eg. FILE1 1 3 1 3 1 3 1 3 FILE2 2 4 2 4 2 4 (1 Reply)
Discussion started by: kylle345
1 Replies

5. Shell Programming and Scripting

joining two or more files

i have three files file a has contents 123 234 238 file b has contents 189 567 567 and file c has contents qwe ert ery (1 Reply)
Discussion started by: tomjones
1 Replies

6. UNIX for Dummies Questions & Answers

Joining two files

I have two comma separated files. I want to join those filesa nd put the result in separate file. smaple data are: file1: A1,1,100 A2,1,200 B1,2,100 B2,2,200 file2 1,50 1,25 1,25 1,100 1,100 2,50 2,50 (10 Replies)
Discussion started by: pandeesh
10 Replies

7. Shell Programming and Scripting

Joining two files into one

Hi experts, I'm quite newbie here!! I have two seperate files. Contents of file like below File 1: 6213019212001 8063737 File:2 15703784 I want to join these two files into one where content will be File 3: 6213019212001 8063737 15703784 Regards, Ray Seilden (1 Reply)
Discussion started by: RayanS
1 Replies

8. Shell Programming and Scripting

Help with joining files and adding headers to files

Hi, I have about 20 tab delimited text files that have non sequential numbering such as: UCD2.summary.txt UCD45.summary.txt UCD56.summery.txt The first column of each file has the same number of lines and content. The next 2 column have data points: i.e UCD2.summary.txt: a 8.9 ... (8 Replies)
Discussion started by: rrdavis
8 Replies

9. Shell Programming and Scripting

Joining 2 Files

File "A" (column names: Nickname Number GB) Nickname Number GB PROD_DB0034 100A 16 ASMIL1B_DATA_003 100B 16 PSPROD_0000 1014 36 PSPROD_0001 100D 223 ..... File "B" (column names: TYPE DEVICE NUMBER SIZE) TYPE DEVICE NUMBER SIZE 1750500 hdisk2 100A 16384 1750500 hdisk3 ... (4 Replies)
Discussion started by: Daniel Gate
4 Replies

10. Shell Programming and Scripting

Please help me in joining two files

I have two files with the below contents : sampleoutput3.txt 20150202;hostname1 20150223;hostname2 20150716;hostname3 sampleoutput1.txt hostname;packages_out_of_date;errata_out_of_date; hostname1;11;0; hostnamea;12;0; hostnameb;11;0; hostnamec;95;38; hostnamed;440;358;... (2 Replies)
Discussion started by: rahul2662
2 Replies
std::shuffle_order_engine< _RandomNumberEngine, __k >(3cxx)			       std::shuffle_order_engine< _RandomNumberEngine, __k >(3cxx)

NAME
std::shuffle_order_engine< _RandomNumberEngine, __k > - SYNOPSIS
Public Types typedef _RandomNumberEngine::result_type result_type" Public Member Functions shuffle_order_engine () shuffle_order_engine (const _RandomNumberEngine &__rne) shuffle_order_engine (_RandomNumberEngine &&__rne) shuffle_order_engine (result_type __s) template<typename _Sseq , typename = typename std::enable_if<!std::is_same<_Sseq, shuffle_order_engine>::value && !std::is_same<_Sseq, _RandomNumberEngine>::value> ::type> shuffle_order_engine (_Sseq &__q) const _RandomNumberEngine & base () const void discard (unsigned long long __z) result_type operator() () void seed () void seed (result_type __s) template<typename _Sseq > void seed (_Sseq &__q) Static Public Member Functions static constexpr result_type max () static constexpr result_type min () Static Public Attributes static constexpr size_t table_size Friends template<typename _RandomNumberEngine1 , size_t __k1, typename _CharT , typename _Traits > std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &, const std::shuffle_order_engine< _RandomNumberEngine1, __k1 > &)" bool operator== (const shuffle_order_engine &__lhs, const shuffle_order_engine &__rhs) template<typename _RandomNumberEngine1 , size_t __k1, typename _CharT , typename _Traits > std::basic_istream< _CharT, _Traits > & operator>> (std::basic_istream< _CharT, _Traits > &, std::shuffle_order_engine< _RandomNumberEngine1, __k1 > &)" Detailed Description template<typename _RandomNumberEngine, size_t __k>class std::shuffle_order_engine< _RandomNumberEngine, __k > Produces random numbers by combining random numbers from some base engine to produce random numbers with a specifies number of bits __w. Definition at line 1222 of file random.h. Member Typedef Documentation template<typename _RandomNumberEngine, size_t __k> typedef _RandomNumberEngine::result_type std::shuffle_order_engine< _RandomNumberEngine, __k >::result_type The type of the generated random value. Definition at line 1229 of file random.h. Constructor &; Destructor Documentation template<typename _RandomNumberEngine, size_t __k> std::shuffle_order_engine< _RandomNumberEngine, __k >::shuffle_order_engine () [inline] Constructs a default shuffle_order_engine engine. The underlying engine is default constructed as well. Definition at line 1238 of file random.h. template<typename _RandomNumberEngine, size_t __k> std::shuffle_order_engine< _RandomNumberEngine, __k >::shuffle_order_engine (const _RandomNumberEngine &__rne) [inline], [explicit] Copy constructs a shuffle_order_engine engine. Copies an existing base class random number generator. Parameters: rng An existing (base class) engine object. Definition at line 1249 of file random.h. template<typename _RandomNumberEngine, size_t __k> std::shuffle_order_engine< _RandomNumberEngine, __k >::shuffle_order_engine (_RandomNumberEngine &&__rne) [inline], [explicit] Move constructs a shuffle_order_engine engine. Copies an existing base class random number generator. Parameters: rng An existing (base class) engine object. Definition at line 1260 of file random.h. template<typename _RandomNumberEngine, size_t __k> std::shuffle_order_engine< _RandomNumberEngine, __k >::shuffle_order_engine (result_type__s) [inline], [explicit] Seed constructs a shuffle_order_engine engine. Constructs the underlying generator engine seeded with __s. Parameters: __s A seed value for the base class engine. Definition at line 1271 of file random.h. template<typename _RandomNumberEngine, size_t __k> template<typename _Sseq , typename = typename std::enable_if<!std::is_same<_Sseq, shuffle_order_engine>::value && !std::is_same<_Sseq, _RandomNumberEngine>::value> ::type> std::shuffle_order_engine< _RandomNumberEngine, __k >::shuffle_order_engine (_Sseq &__q) [inline], [explicit] Generator construct a shuffle_order_engine engine. Parameters: __q A seed sequence. Definition at line 1285 of file random.h. Member Function Documentation template<typename _RandomNumberEngine, size_t __k> const _RandomNumberEngine& std::shuffle_order_engine< _RandomNumberEngine, __k >::base () const [inline] Gets a const reference to the underlying generator engine object. Definition at line 1328 of file random.h. template<typename _RandomNumberEngine, size_t __k> void std::shuffle_order_engine< _RandomNumberEngine, __k >::discard (unsigned long long__z) [inline] Discard a sequence of random numbers. Definition at line 1349 of file random.h. template<typename _RandomNumberEngine, size_t __k> static constexpr result_type std::shuffle_order_engine< _RandomNumberEngine, __k >::max () [inline], [static] Gets the maximum value in the generated random number range. Definition at line 1342 of file random.h. template<typename _RandomNumberEngine, size_t __k> static constexpr result_type std::shuffle_order_engine< _RandomNumberEngine, __k >::min () [inline], [static] Gets the minimum value in the generated random number range. Definition at line 1335 of file random.h. template<typename _RandomNumberEngine , size_t __k> shuffle_order_engine< _RandomNumberEngine, __k >::result_type std::shuffle_order_engine< _RandomNumberEngine, __k >::operator() () Gets the next value in the generated random number sequence. Definition at line 777 of file random.tcc. template<typename _RandomNumberEngine, size_t __k> void std::shuffle_order_engine< _RandomNumberEngine, __k >::seed () [inline] Reseeds the shuffle_order_engine object with the default seed for the underlying base class generator engine. Definition at line 1294 of file random.h. template<typename _RandomNumberEngine, size_t __k> void std::shuffle_order_engine< _RandomNumberEngine, __k >::seed (result_type__s) [inline] Reseeds the shuffle_order_engine object with the default seed for the underlying base class generator engine. Definition at line 1305 of file random.h. template<typename _RandomNumberEngine, size_t __k> template<typename _Sseq > void std::shuffle_order_engine< _RandomNumberEngine, __k >::seed (_Sseq &__q) [inline] Reseeds the shuffle_order_engine object with the given seed sequence. Parameters: __q A seed generator function. Definition at line 1318 of file random.h. Friends And Related Function Documentation template<typename _RandomNumberEngine, size_t __k> template<typename _RandomNumberEngine1 , size_t __k1, typename _CharT , typename _Traits > std::basic_ostream<_CharT, _Traits>& operator<< (std::basic_ostream< _CharT, _Traits > &, const std::shuffle_order_engine< _RandomNumberEngine1, __k1 > &) [friend] Inserts the current state of a shuffle_order_engine random number generator engine __x into the output stream __os. Parameters: __os An output stream. __x A shuffle_order_engine random number generator engine. Returns: The output stream with the state of __x inserted or in an error state. template<typename _RandomNumberEngine, size_t __k> bool operator== (const shuffle_order_engine< _RandomNumberEngine, __k > &__lhs, const shuffle_order_engine< _RandomNumberEngine, __k > &__rhs) [friend] Compares two shuffle_order_engine random number generator objects of the same type for equality. Parameters: __lhs A shuffle_order_engine random number generator object. __rhs Another shuffle_order_engine random number generator object. Returns: true if the infinite sequences of generated values would be equal, false otherwise. Definition at line 1373 of file random.h. template<typename _RandomNumberEngine, size_t __k> template<typename _RandomNumberEngine1 , size_t __k1, typename _CharT , typename _Traits > std::basic_istream<_CharT, _Traits>& operator>> (std::basic_istream< _CharT, _Traits > &, std::shuffle_order_engine< _RandomNumberEngine1, __k1 > &) [friend] Extracts the current state of a % subtract_with_carry_engine random number generator engine __x from the input stream __is. Parameters: __is An input stream. __x A shuffle_order_engine random number generator engine. Returns: The input stream with the state of __x extracted or in an error state. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Nov 27 2012 std::shuffle_order_engine< _RandomNumberEngine, __k >(3cxx)
All times are GMT -4. The time now is 08:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy