Assuming that you don't really want to throw away the input line marked in red above, and assuming that the chromosome position that you want to sort on is in the 2nd column; it would seem that the command you want is:
where file is the name of the file you want to sort.
Thanks for this. It works, but I need to sort the first column too. If chromosome 12 has a start position lesser than chromosome 1 then that would appear. I would need to sort by chromosome and position.
Hello. I've read a few threads on how to sort on multiple fields, but I still can't get my file to sort correctly.
I have a comma delimited .csv file will over a hundred fields. I want to sort it by field 2, field 62 and then field 61 (integer fields).
input looks like this well swap field... (2 Replies)
Hi,
This is my input file:
ali 5 usa abc
abu 4 uk bca
alan 6 brazil bac
pinky 10 utah sdc
My desired output:
pinky 10 utah sdc
alan 6 brazil bac
ali 5 usa abc
abu 4 uk bca
Based on the column two, I want to do the descending order and print out other related column at the... (3 Replies)
Experts, how to sort this fields with numerical order :
-How to use the sort command in this case, I was thinking with -k but it is not working,
lan5000
lan5000:1
lan5000:10
lan5000:11
lan5000:12
lan5000:13
lan5000:14
lan5000:15
lan5000:16
lan5000:17 ... (6 Replies)
Hi,
I would like to sort a list in different ways:
1> Unique based on Field 1 with highest Field 4
For Instance Input:
1678923450;11112222333344;11-1x;2_File.xml
1678923450;11112222333344;11-1x;5_File.xml
1234567890;11113333222244;11-1x;3_File.xml
Output:
... (7 Replies)
I have a csv dump from sql server that needs to be converted so it can be feed to another program. I already sorted on field 1 but there are multiple columns with same field 1 where it needs to be compared against and if it is same then append field 5.
i.e from
ANG SJ,0,B,LC22,LC22(0)
BAT... (2 Replies)
sqlplus -s $USER_ID@$SID/$PWD<<EOF>sql_1.txt
set feedback off
set heading off
select 114032 as c_1 from dual ;
EOF
for i in `cat sql_1.txt`
do
sh script_1.sh $i
Currently i am passing one column value to the single unix variable.
How can i pass the values from 2... (2 Replies)
New to unix.
I need to sort the records of a file by a control number field. That field is in POS 16 through 28. How do I do that? There are no delimiters, or spaces to separate fields.
See example below. Each line is a record.
REC1CCYYMMDD0018888888888888ABCDE... (1 Reply)
Hi All,
I have one requirement, where I need to have output of ls -l command sorted on 1) first on filename 2) last modified time ( descending ) - latest change first.
I am not able to figure out how to do it..
Also I dont have a way to change Date display for ls -ltr command..
I am... (5 Replies)
Hi All,
I need to read values of 10 columns from oracle query and assign the same to 10 unix variables. The query will return only one record(row).
I tried to append all these columns using a delimiter(;) in the select query and assign the same to a single variable(V) in unix. I thought I... (3 Replies)
Discussion started by: hkrishnan91
3 Replies
LEARN ABOUT OPENSOLARIS
ppmhist
ppmhist(1) General Commands Manual ppmhist(1)NAME
ppmhist - print a histogram of a portable pixmap
SYNOPSIS
ppmhist [-hexcolor] [-noheader] [-map] [-nomap] [-sort={frequency,rgb}] [ppmfile]
DESCRIPTION
Reads a PPM image as input. Generates a histogram of the colors in the image, i.e. a list of all the colors and how many pixels of each
color are in the image.
OPTIONS
-sort={frequency,rgb}
The -sort option determines the order in which the colors are listed in the output. frequency means to list them in order of how
pixels in the input image have the color, with the most represented colors first. rgb means to sort them first by the intensity of
the red component of the color, the of the green, then of the blue, with the least intense first.
The default is frequency.
-hexcolor
Print the color components in hexadecimal. Default is decimal.
-noheader
Do not print the column headings.
-map Generates a PPM file of the colormap for the image, with the color histogram as comments.
-nomap Generates the histogram for human reading. This is the default.
SEE ALSO ppm(5), pgmhist(1), ppmtomap(1), pnmhistmap(1), ppmchange(1)AUTHOR
Copyright (C) 1989 by Jef Poskanzer.
17 September 2000 ppmhist(1)