Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Merge rows into one if first 2 columns match Post 302941403 by ankitas on Wednesday 15th of April 2015 09:01:15 PM
Old 04-15-2015
I was able to megre first column but not sure on second column.I tried but didnt get the output in required manner.

Output should be like below.

Code:
/hello,a,r:L:X
/hi,b,:v:c

Thanks for your reply

Last edited by Scrutinizer; 04-16-2015 at 12:04 AM.. Reason: CODE tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to merge rows into columns ????

Hi guz I want to merge multiple rows into a multiple columns based on the first column. The file has symbol // I want to break the symbool // and I nedd exactlynew column at that point the output will be like this please guyz help in this isssue!!!!! merging rows into columns ... (4 Replies)
Discussion started by: bogu0001
4 Replies

2. Shell Programming and Scripting

merge similar rows

I have a large file (10M lines) that contains two columns: a frequency and a string, ex: 3 aaaaa 4 bbbbb 2 ccccc 5 aaaaa 1 ddddd 4 ccccc I need to merge the lines whose string part is the same, while updating the frequency. The output should look like this: 8 aaaaa 4 bbbbb 5 ccccc... (2 Replies)
Discussion started by: tootles564
2 Replies

3. Shell Programming and Scripting

Match on first and last columns and merge

Hi Friends, I have an input file of this kind input.txt output.txt The logic is as follows, read a row, compare column1 to the next, if there is a match, compare column4. If these two match, grab the minimum of column2 and maximum of column3 and print the output with column1,... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

4. Shell Programming and Scripting

Deleting all the fields(columns) from a .csv file if all rows in that columns are blanks

Hi Friends, I have come across some files where some of the columns don not have data. Key, Data1,Data2,Data3,Data4,Data5 A,5,6,,10,, A,3,4,,3,, B,1,,4,5,, B,2,,3,4,, If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies

5. Shell Programming and Scripting

Evaluate 2 columns, add sum IF two columns match on two rows

Hi all, I know this sounds suspiciously like a homework course; but, it is not. My goal is to take a file, and match my "ID" column to the "Date" column, if those conditions are true, add the total number of minutes worked and place it in this file, while not printing the original rows that I... (6 Replies)
Discussion started by: mtucker6784
6 Replies

6. Shell Programming and Scripting

Merge matching rows

Hello, I need this output. thank you very much. input: Code: ***table***wood ***snack***top ***table***garfield ***big***zen ***table***cars output: Code: ***table***wood2345garfield2345cars ***snack***top ***big***zen (7 Replies)
Discussion started by: tara123
7 Replies

7. Shell Programming and Scripting

Compare 2 csv files by columns, then extract certain columns of matcing rows

Hi all, I'm pretty much a newbie to UNIX. I would appreciate any help with UNIX coding on comparing two large csv files (greater than 10 GB in size), and output a file with matching columns. I want to compare file1 and file2 by 'id' and 'chain' columns, then extract exact matching rows'... (5 Replies)
Discussion started by: bkane3
5 Replies

8. Shell Programming and Scripting

Rows to Columns with match criteria

Hello Friends, I have a input file having hundreds of rows. I want them to translate in to columns if column 1 is same. Input data: zp06 xxx zp06 rrr zp06 hhh zp06 aaa zp06 ggg zp06 qwer zp06 ser zl11 old3 zl11 old4 zl11 old5 zl11 old6 zl11 old7 zm14 luri zm14 body zm14 ucp (9 Replies)
Discussion started by: suresh3566
9 Replies

9. Shell Programming and Scripting

Request: How to Parse dynamic SQL query to pad extra columns to match the fixed number of columns

Hello All, I have a requirement in which i will be given a sql query as input in a file with dynamic number of columns. For example some times i will get 5 columns, some times 8 columns etc up to 20 columns. So my requirement is to generate a output query which will have 20 columns all the... (7 Replies)
Discussion started by: vikas_trl
7 Replies

10. UNIX for Beginners Questions & Answers

Data match 2 files based on first 2 columns matching only and join if match

Hi, i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file I have tried with join and awk and i keep getting blank outputs or same file is there an easier way than what i am... (4 Replies)
Discussion started by: axis88
4 Replies
SVK::Command::Merge(3)					User Contributed Perl Documentation				    SVK::Command::Merge(3)

NAME
SVK::Command::Merge - Apply differences between two sources SYNOPSIS
merge -r N:M DEPOTPATH [PATH] merge -r N:M DEPOTPATH1 DEPOTPATH2 merge -r N:M [--to|--from] [PATH] OPTIONS
-r [--revision] N:M : act on revisions between N and M -c [--change] N : act on change N (between revisions N-1 and N) using -N reverses the changes made in revision N -I [--incremental] : apply each change individually -a [--auto] : merge from the previous merge point -l [--log] : use logs of merged revisions as commit message -s [--sync] : synchronize mirrored sources before operation -t [--to] : merge to the specified path -f [--from] : merge from the specified path --summary : display related logs in this merge --verbatim : verbatim merge log without indents and header --no-ticket : do not record this merge point --track-rename : track changes made to renamed node -m [--message] MESSAGE : specify commit message MESSAGE -F [--file] FILENAME : read commit message from FILENAME --template : use the specified message as the template to edit --encoding ENC : treat -m/-F value as being in charset encoding ENC -P [--patch] NAME : instead of commit, save this change as a patch -S [--sign] : sign this change -C [--check-only] : try operation but make no changes --direct : commit directly even if the path is mirrored perl v5.10.0 2008-08-04 SVK::Command::Merge(3)
All times are GMT -4. The time now is 01:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy