How to add a new line between different column data content?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to add a new line between different column data content?
Prev   Next
# 1  
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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
Login or Register to Ask a Question
CONVERT_SEQ(1)							   User Commands						    CONVERT_SEQ(1)

NAME
convert_seq - conversion of sequence and alignment formats SYNOPSIS
convert_seq [OPTION] DESCRIPTION
convert_seq is used for sequence and alignment format conversion. Instead of using command line arguments it starts a conversation with the user where the desired function can be invoked by answering questions. This program is used by the prof(1) secondary structure, accessibility and transmembrane helix predictor from Burkhard Rost. OPTIONS
None. Answer questions printed on STDOUT by typing your choice into STDIN. AUTHORS
Reinhard Schneider Mar, 1991 version 1.0 LION http://www.lion-ag/ Heidelberg Ulrike Goebel Mar, 1997 version 1.1 LION http://www.lion-ag/ Heidelberg Reinhard Schneider Mar, 1997 version 2.0 LION http://www.lion-ag/ Heidelberg Burkhard Rost May, 1998 version 2.1 EMBL/LION Heidelberg Burkhard Rost Oct, 1998 version 2.2 Laszlo Kajan <lkajan@rostlab.org> TU Muenchen, Germany Guy Yachdav <gyachdav@rostlab.org> CUBIC (Columbia University, NY, USA), Technical University Munich (Munich, DE), BioSof LLC (USA) SEE ALSO
prof(1), filter_hssp(1) 1.0.9 2011-09-27 CONVERT_SEQ(1)