Sponsored Content
Top Forums Shell Programming and Scripting How to add a new line between different column data content? Post 302379227 by patrick87 on Thursday 10th of December 2009 01:19:14 AM
Old 12-10-2009
How to add a new line between different column data content?

Input file:
Code:
Germany 10 500 5000
Germany 20 500 5000
Germany 50 10 500
England 5 10 25
USA 30 25 55
USA 20 35 90
Japan 2 5 60
Singapore 50 30 90
Singapore 150 230 290

Output file:
Code:
Germany 10 500 5000
Germany 20 500 5000
Germany 50 10 500

England 5 10 25

USA 30 25 55
USA 20 35 90

Japan 2 5 60

Singapore 50 30 90
Singapore 150 230 290

I plan to add new line between different column data content based on column 1 data similarity. As I know,"\n" able to add new line. Unfortunately I can't add new line based on the column 1 data similarity to determine it Smilie
Thanks a lot for sharing.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

column data to rows every n line

Hi every one, I am trying to organise an input text file like: input 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 into an output as following: output file 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 (5 Replies)
Discussion started by: nxp
5 Replies

2. Shell Programming and Scripting

Help with add new line in between each content

Input file: 48458951 49529947 46700865 46207063 52639785 47012578 55872838 49258996 Desired output file: 48458951 49529947 46700865 46207063 (1 Reply)
Discussion started by: perl_beginner
1 Replies

3. Shell Programming and Scripting

Help with analysis data based on particular column content

Input file: Total_counts 1306726155 100% Number_of_count_true 855020282 Number_of_count_true_1 160014283 Number_of_count_true_2 44002825 Number_of_count_true_3 18098424 Number_of_count_true_4 24693745 Number_of_count_false 115421870 Number_of_count_true 51048447 Total_number_of_false ... (2 Replies)
Discussion started by: perl_beginner
2 Replies

4. Shell Programming and Scripting

Column content match and add suffix

My input chr3 galGal3_xenoRefFlat CDS 4178235 4178264 0.000000 + 0 gene_id "T6J4.19; T6J4_19"; transcript_id "T6J4.19; T6J4_19"; chr3 galGal3_xenoRefFlat exon 4178235 4178264 0.000000 + . gene_id "T6J4.19; T6J4_19"; transcript_id "T6J4.19;... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

5. Shell Programming and Scripting

Break a line content and print as column

Hi, I have urls in my input file like this http://unix.com/abc/def http://unix.com/kil/min I want to use the / as separator and print the last content as another column like this http://unix.com/abc/def def http://unix.com/kil/min min I was using awk -F option and then joining the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies

6. Shell Programming and Scripting

Help to print the line that share exactly same with column one content

Input file : AAAG TC AACCCT AACCCT AACCCT AACCCT TCTG TCTG TCTG AC AC TCTG TCTG AC AC AC AC AC AGTG AC AGTG TCC Desired output file : AACCCT AACCCT AACCCT AACCCT AC AC I would like to print out the line that share exactly same as the first column data content. Column one data... (4 Replies)
Discussion started by: perl_beginner
4 Replies

7. Shell Programming and Scripting

Insert data in first column(if blank) from previous line first column

Dear Team I need to insert field(which is need to taken from previous line's first field) in first column if its blank. I had tried using sed but not find the way. Detail input and output file as below. Kindly help for same. INPUT: SCGR SC DEV DEV1 NUMDEV DCP ... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies

8. Shell Programming and Scripting

Add Column base on other Column Data

HI Guys, I want add one extra Column base on 3rd Column . Input :- M204 MS204_154 :vsDataUeMe M204 MS204_154 es:sMeasure 0 M204 MS204_154 es:90ilterCoe 9 M204 MS204_154 es:searchE9090ortTime 40 M204 MS204_154 es:servOrPrioI90HoTimer 4000 M204 MS204_154 es:ueMeajllls154545 TRUE... (5 Replies)
Discussion started by: pareshkp
5 Replies

9. Shell Programming and Scripting

Break a line content and print as column

Hi, I have urls in my input file like this (1 Reply)
Discussion started by: tmonk1
1 Replies

10. UNIX for Beginners Questions & Answers

How to add a column of another data from another column?

Hola Como hacer: C:\System\SystemRun.4gl C:\System\SystemRunPrint.4gl C:\System\SystemViews.4gl Resultado: SystemRun.4gl C:\System\SystemRun.4gl SystemRunPrint.4gl C:\System\SystemRunPrint.4gl SystemViews.4gl C:\System\SystemViews.4gl... (0 Replies)
Discussion started by: tlaloc
0 Replies
BALLView(1)						      General Commands Manual						       BALLView(1)

NAME
BALLView - A free molecular modeling and molecular graphics tool SYNOPSIS
BALLView [Molecular-file] DESCRIPTION
BALLView BALLView provides fast OpenGL-based visualization of molecular structures, molecular mechanics methods (minimization, MD simula- tion using the AMBER and CHARMM force fields), calculation and visualization of electrostatic properties (FDPB). BALLView is based on BALL (Biochemical Algorithms Library) , which is currently being developed in the groups of Oliver Kohlbacher (Univer- sity of Tuebingen, Germany), Andreas Hildebrandt (Saarland University, Saarbruecken, Germany), and Hans-Peter Lenhof (Saarland University, Saarbruecken, Germany). BALL is an application framework in C++ that has been specifically designed for rapid software development in Molecular Modeling and Computational Molecular Biology. It provides an extensive set of data structures as well as classes for Molecular Mechanics, advanced solvation methods, comparison and analysis of protein structures, file import/export, and visualization. BALLView is available under the LGPL licence. Homepage: www.BALLView.org USAGE
To run BALLView, simply type: BALLView or BALLView file.pdp where file.pdb is your PDB file. BALLView also supports HIN, MOL, MOL2 and SD files. BALLView provides HTML documentation, that is available in the application itself (see Help menu). This package also includes Python example scripts, that can be run in BALLView. They can be found under /usr/share/BALL/PYTHON. AUTHOR
BALLView is copyright 1998-2009 by the BALL project group SEE ALSO
http://www.ballview.org 24 January 2009 BALLView(1)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy