Sponsored Content
Top Forums Shell Programming and Scripting Merging several line in one based on an occurrence Post 302594036 by xanthos on Monday 30th of January 2012 09:19:50 AM
Old 01-30-2012
Merging several line in one based on an occurrence

Hi,

I try to gather several line in one based on the first column.

For exemple :

Code:
toto;1;2;3
toto;4;5;6
toto;7;8;9
etc...   (Number of lines not predefined)
ruru;a;b;c
ruru;d;e;f
ruru;g;h;i
...

I'm trying to get :

Code:
toto;1;2;3;4;5;6;7;8;9...
ruru;a;b;c;d;e;f;g;h;i...

Thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

merging two files based on some key

I have to merge two files: The files are having the same format like A0this is first line TOlast line silmilarly other lines. I have to search for A0 line in the second file also and then put the data in the third file under A0 heading ,then for A1 and so on. A0 portion will be treminated... (1 Reply)
Discussion started by: Vandana Yadav
1 Replies

2. Shell Programming and Scripting

Merging of all files based on a condition

Hi Friends, I am new to UNIX. I need to merge all the files(to FINAL.txt) in single directory based one condition. Out of all the files one of file will have specific value like :GF01: at any where in the file. so the file which is having :GF01: should be appended at the last. EX:... (5 Replies)
Discussion started by: arund_01
5 Replies

3. Shell Programming and Scripting

Count no of occurrence of the strings based on column value

Can anyone help me to count number of occurrence of the strings based on column value. Say i have 300 files with 1000 record length from which i need to count the number of occurrence string which is existing from 213 to 219. Some may be unique and some may be repeated. (8 Replies)
Discussion started by: zooby
8 Replies

4. Shell Programming and Scripting

merging two files based on first column

I had two files file1 and file2. I want a o/p file(file3) like below using first column as ref. Pls give suggestion ass join is not working as the number of lines in each file is nealry 5 C? file1 --------------------- 404000324810001 Y 404000324810004 N 404000324810008 Y 404000324810009 N... (1 Reply)
Discussion started by: p_sai_ias
1 Replies

5. Shell Programming and Scripting

Merging two files with merging line by line

Hi, I have two files and i want to merge it like, file1.txt --------- abc cde efg file2.txt ------- 111 222 333 Output file should be, -------------- abc 111 (2 Replies)
Discussion started by: rbalaj16
2 Replies

6. UNIX for Dummies Questions & Answers

Merging lines based on one column

Hi, I have a file which I'd like to merge lines based on duplicates in one column while keeping the info for other columns. Let me simplify it by an example: File ESR1 ANASTROZOLE NA FDA_approved ESR1 CISPLATIN NA FDA_approved ESR1 DANAZOL agonist NA ESR1 EXEMESTANE NA FDA_approved... (3 Replies)
Discussion started by: JJ001
3 Replies

7. Shell Programming and Scripting

Merging 2 lines based on a string

Dear Unix gurus I need help with a command or script to merge 2 lines where ever we find the string. I have attached scanned document. First line has string value: VSIN, immediate line has value: SETTLEMENT Where it finds the 2 string values in the whole file, one below the other,... (8 Replies)
Discussion started by: Karunyam
8 Replies

8. UNIX for Dummies Questions & Answers

Count occurrence of string (based on type) in a column using awk

Hello, I have a table that looks like what is shown below: AA BB CC XY PQ RS AA BB CC XY RS I would like the total counts depending on the set they belong to: if search pattern is in {AA, BB, CC} --> count them as Type1 | wc -l (3 Replies)
Discussion started by: Gussifinknottle
3 Replies

9. UNIX for Beginners Questions & Answers

Merging multiple lines into single line based on one column

I Want to merge multiple lines based on the 1st field and keep into single record. SRC File: AAA_POC_DB.TAB1 AAA_POC_DB.TAB2 AAA_POC_DB.TAB3 AAA_POC_DB.TAB4 BBB_POC_DB.TAB1 BBB_POC_DB.TAB2 CCC_POC_DB.TAB6 OUTPUT ----------------- 'AAA_POC_DB','TAB1','TAB2','TAB3','TAB4'... (10 Replies)
Discussion started by: raju2016
10 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
XSDDIAGRAM(1)							   User Commands						     XSDDIAGRAM(1)

NAME
xsddiagram - Xml Schema Definition (XSD) diagram viewer SYNOPSIS
XSDDiagram.exe [-o output.svg] [-so EXTENSION] [-r RootElement]* [-e N] [-z N] [file.xsd] DESCRIPTION
XSD Diagram, version 0.10.0.0 -o FILE specifies the output image. Only '.svg' or '.png' are allowed. If not present, the GUI is shown. -so EXTENSION specifies the output image is streamed through the standard output. EXTENSION can be: png, jpg, svg or emf (emf on Windows only). If not present, the GUI is shown. -r ELEMENT specifies the root element of the tree. You can put several -r options = several root elements in the tree. -e N specifies the expand level (from 0 to what you want). Be carefull, the result image can be huge. -z N specifies the zoom percentage from 10% to 1000% (only for .png image). Work only with the '-o', '-os png' or '-os jpg' option. Example 1: > XSDDiagram.exe -o file.png -r TotoRoot -e 3 -z 200 ./folder1/toto.xsd will generate a PNG image from a diagram with a root element 'TotoRoot' and expanding the tree from the root until the 3rd level. Example 2: > XSDDiagramConsole.exe ./folder1/toto.xsd will load the xsd file in the GUI window. Example 3: > XSDDiagram.exe -r TotoRoot -e 2 ./folder1/toto.xsd will load the xsd file in the GUI window with a root element 'TotoRoot' and expanding the tree from the root until the 2nd level. Example 4: > XSDDiagram.exe -os svg -r TotoRoot -e 3 ./folder1/toto.xsd will write a SVG image in the standard output from a diagram with a root element 'TotoRoot' and expanding the tree from the root until the 3rd level. xsddiagram 0.10 April 2012 XSDDIAGRAM(1)
All times are GMT -4. The time now is 05:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy