Sponsored Content
Top Forums Shell Programming and Scripting How to add a new line between different column data content? Post 302379235 by Scrutinizer on Thursday 10th of December 2009 02:14:13 AM
Old 12-10-2009
Alternatively awk, (works the same):
Code:
awk 'p!=$1&&NR>1{p=$1;printf "\n"}1' infile

 

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
lang(5int)																lang(5int)

Name
       lang - language names

Description
       The  language  support databases used by are stored in the directory If either the language support databases are moved or you specify your
       own language support database, it is necessary to set the INTLINFO environment variable to the new location of these tables. The syntax	of
       this environment variable is identical to See the reference page for more information.

       Should  you  want to create your own database, use the reference  page and the Guide to Developing International Software as references for
       what information your database should contain.  After you create the database, you can specify it by using the international compiler,

       The following table defines the supplied settings of the LANG and LC_ environment variables.

       ---------------------------------------------------------------------
       Database      Language	Territory	 Codeset       Use
       ---------------------------------------------------------------------
       ENG_GB.MCS    English	United Kingdom	 DEC MCS       VT200 series
       FRE_FR.MCS    French	France
       GER_DE.MCS    German	Germany

       ENG_GB.8859   English	United Kingdom	 ISO Latin-1   VT300 series
       FRE_FR.8859   French	France
       GER_DE.8859   German	Germany

       ENG_GB.646    English	United Kingdom	 ISO 646       VT100 series
       FRE_FR.646    French	France
       GER_DE.646    German	Germany
       ---------------------------------------------------------------------

       In addition to the default collation definition for the GER_DE.nnn language, Digital provides a character  collation  table  that  collates
       information  using  the	German telephone directory ordering of data. The following example shows how to set the variable to use this table
       with the ISO Latin-1 codeset:
       LC_COLLATE = GER_DE.8859@P_TELEPHONE

See Also
       ic(1int), intro(3int), nl_langinfo(3int), setlocale(3int), environ(5int)
       Guide to Developing International Software

																	lang(5int)
All times are GMT -4. The time now is 05:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy