Sponsored Content
Top Forums Shell Programming and Scripting sorting based on alternative lines Post 302549702 by Diya123 on Tuesday 23rd of August 2011 06:07:48 PM
Old 08-23-2011
first file

Code:
@SFGF-GA2-1_58:5:36:11009:999#0/1
ATGCATGCATGCATGCATAGGCATAGATAGACAGATACAGATATAGACATAGACATAGAAATATAT
+SFGF-GA2-1_58:5:36:11009:999#0/1
################################################################################
@SFGF-GA2-1_58:5:36:14498:1110#0/1
ATGGCGCTTTGCGTGGGCGTTTGACGAAGTTTGGGACCAGGGATAGCAGAAAATTTGACATAGACAT
+SFGF-GA2-1_58:5:36:14498:999#0/1
################################################################################
@SFGF-GA2-1_58:5:36:3395:1010#0/1
ATGCATGCCCCGTTTTAAACCGTTTGAAATTGCDCATGGATTTAGGGACCCATTGACCCATTACAATA
+SFGF-GA2-1_58:5:36:3395:1010#0/1
################################################################################

o/p

second file
[CODE]@SFGF-GA2-1_58:5:36:11009:999#0/1
ATGCATGCATGCATGCATAGGCATAGATAGACAGATACAGATATAGACATAGACATAGAAATATAT
@SFGF-GA2-1_58:5:36:14498:1110#0/1
ATGGCGCTTTGCGTGGGCGTTTGACGAAGTTTGGGACCAGGGATAGCAGAAAATTTGACATAGACAT
@SFGF-GA2-1_58:5:36:3395:1010#0/1
ATGCATGCCCCGTTTTAAACCGTTTGAAATTGCDCATGGATTTAGGGACCCATTGACCCATTACAATA

second o/p

Code:
@SFGF-GA2-1_58:5:36:11009:999#0/1
ATGCATGCATGCATGCATAGGCATAGATAGACAGATACAGATATAGACATAGACATAGAAATATAT
@SFGF-GA2-1_58:5:36:3395:1010#0/1
ATGCATGCCCCGTTTTAAACCGTTTGAAATTGCDCATGGATTTAGGGACCCATTGACCCATTACAATA
@SFGF-GA2-1_58:5:36:14498:1110#0/1
ATGGCGCTTTGCGTGGGCGTTTGACGAAGTTTGGGACCAGGGATAGCAGAAAATTTGACATAGACAT

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sorting based on columns

Hi, I want a list of entries in 3 space delimited columns. I want to sort entries based on the very first column. Rows can't be changed. For example: If I have... Abc Abc Acc Bca Bda Bdd Cab Cab Cbc Dbc Dca Dda Abc Abc Acc the output should be... Abc Abc Acc Abc Abc Acc Bca... (7 Replies)
Discussion started by: MobileUser
7 Replies

2. UNIX for Advanced & Expert Users

Alternative needed for joining lines with a match

Hi, The following sed command is not working for me, does anyone have a good alternative for joining lines in a file based on a match? # if a line ends with a backslash, append the next line to it sed -e :a -e '/\\$/N; s/\\\n//; ta' (6 Replies)
Discussion started by: greptastic
6 Replies

3. Shell Programming and Scripting

Sorting lines based on keywords for MySQL script

the thing which i require is very very complex.. i tried hard to find the solution but couldnt.. the thing i need to achieve is say i have a file cat delta.sql CREATE VIEW Austin Etc etc . . . CREATE VIEW Barabara AS SELECT blah blah blah FROM Austin z, Cluster s, Instance i WHERE... (4 Replies)
Discussion started by: vivek d r
4 Replies

4. Shell Programming and Scripting

sorting based on a field

the below is sorted as it is. the fields that i'm interested in are the 4th and 5th field. i want to sort the based on the 4th field. my past attempt to do this was to do something like this: awk '{print $4}'| awk '{print $1":"$2}' datafile | sort | uniq however, if i do that, i lose... (2 Replies)
Discussion started by: SkySmart
2 Replies

5. Shell Programming and Scripting

Sorting based on a particular colum

Hi, I want a flat file(pipe delimited) to be sorted based on 2nd column only. Below is input file to be sorted. AVERS|K50034|A|Y|N|N|Y|Y|Y|||N|N AVERS|K50035|A|Y|N|N|Y|Y|Y|||N|N... (11 Replies)
Discussion started by: Nikhath
11 Replies

6. Shell Programming and Scripting

Sorting file based on name

Hi team, We have few files landing to our server based on sequence number. These files have to be processed in the sequence number order. Once the sequence number has reached its maximum, the files with sequence number 0000 has to be processed. For example: IN9997 IN9998 IN9999 IN0000... (7 Replies)
Discussion started by: anijan
7 Replies

7. Shell Programming and Scripting

Sorting based on the second field

Oracle Enterprise Linux 6 This is my file. Two fields separated by space $ cat testfile.txt MARCH9 MARCH4 MARCH1 MARCH5 MARCH2 MARCH326 MARCH821 MARCH7 MARCH6 MARCH2 $ $ The following numeric sort, based on the first field's 6th character works as expected. $ $ sort -n -k 1.6... (7 Replies)
Discussion started by: John K
7 Replies

8. Shell Programming and Scripting

Sorting block of lines based on specified strings

Below is the part of contents of a file cat outputFile.txt :APP-MS-service_monitoring-118054-DiskFilling-S Description=Disk is getting filled. If Condition=If Event/Log Level(ANY) and matching substring "DiskFilling" Log: xx.x.x..xx.: 4 days 1:33:54.42 Date and time=03-18-2013... (2 Replies)
Discussion started by: vivek d r
2 Replies

9. Shell Programming and Scripting

Sorting based on filename

Hello , I have to write a bash script. I will explain the logic based on a scenario. Scenario : Suppose I have few files in a Folder X : FILE_201508.list FILE_201510.list FILE_201507.list abc_201510.csv xyz_201508.csv abc_201507.csv def_201507.csv 1) Now ,... (3 Replies)
Discussion started by: smamrm
3 Replies

10. Shell Programming and Scripting

Sorting based on File name

Hi All I have a requirement to list all the files in chronological order based on the date value in the file name.For ex if I have three files as given below ABC_TEST_20160103_1012.txt ABC_TEST_20160229_1112.txt ABC_TEST_20160229_1112.txt I have written code as given below to list out... (2 Replies)
Discussion started by: ginrkf
2 Replies
PAPS(1) 						      General Commands Manual							   PAPS(1)

NAME
paps - UTF-8 to PostScript converter using Pango SYNOPSIS
paps [options] files... DESCRIPTION
paps reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves through the pango ft2 backend. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --landscape Landscape output. Default is portrait. --columns=cl Number of columns output. Default is 1. Please notice this option isn't related to the terminal length as in a "80 culums terminal". --font=desc Set the font description. Default is Monospace 12. --rtl Do right to left (RTL) layout. --paper ps Choose paper size. Known paper sizes are legal, letter and A4. Default is A4. Postscript points Each postscript point equals to 1/72 of an inch. 36 points are 1/2 of an inch. --bottom-margin=bm Set bottom margin. Default is 36 postscript points. --top-margin=tm Set top margin. Default is 36 postscript points. --left-margin=lm Set left margin. Default is 36 postscript points. --right-margin=rm Set right margin. Default is 36 postscript points. --gutter-width=gw Set gutter width. Default is 40 postscript points. --help Show summary of options. --header Draw page header for each page. --markup Interpret the text as pango markup. --lpi Set the lines per inch. This determines the line spacing. --cpi Set the characters per inch. This is an alternative method of specifying the font size. --stretch-chars Indicates that characters should be stretched in the y-direction to fill up their vertical space. This is similar to the texttops behaviour. AUTHOR
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>. This manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others). April 17, 2006 PAPS(1)
All times are GMT -4. The time now is 03:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy