I have the following output where I need to sort the second column numerically (starting with IBMULT3580-TD10 and ending in IBMULT3580-TD123)
I'm trying to apply the sort, and the output is getting sorted, but not numerically:
I tried adding -n but it produces a rather weird output, seemingly in random order. Any suggestions how to sort this string numerically? I can't figure it out from the sort man page. TIA!
Hi All,
First time poster.
I have a text file that as many entries like below (single line):
egrep RspTime conlb.txt |more
S(xxx.xxx.xxx.xxx:5050:UP) Hits(13358983, 2/sec, P) ATr(2) Mbps(0.07) BWlmt(0 kbits) RspTime(16.50 ms)
...
I am trying to sort on the RspTime from highest to lowest... (4 Replies)
I would like to sort a large ascii file. Primary sort on the 1st column, and secondary sort on the second column. The file consists of 10 rows of header text and then thousands of rows with 6 columns. I want to sort all of the rows by the first column and second column. As an example, here is... (2 Replies)
Hi all
i am facing a problem in sorting command. The script depending on the sorting command works fine only if ascii sorting is done.
i need to know how to find out how to perform ascii sorting. sorting is case insensitive in
my file has data in the following format.
AA/BB/
AAA/BB\
also... (1 Reply)
Looking for help for sort, I learned that for sorting numbers I use:
sort -n
but it seems that that is not enough when you have numbers like 0.2000E+7 for example, sort -n will not worry about the E+7 part, and will just sort the numbers like 0.2000.
Exapmle:
cat example.txt
.91000E+07... (9 Replies)
hi all,
i need help on sorting data.
i have a file as below
/home/oracle $ cat 234.txt
+1234
-2356
-1001
+231
0023
-0987
+19000
65487
6
after sorting i want the output as below
-2356
-1001 (2 Replies)
Hello,
I have a file such as this:
chr1
chr2
chr1
chr2
chr3
chr10
chr4
chr5
chrz
chr1AI want to sort it, I use this command:
sort -k1 -th -n testfilebut I get this output, how can I fix this?
chr1
chr1
chr10
chr1A
chr2
chr2 (3 Replies)
Hi Guys,
Would appreciate some help on sorting numbers on a file using the sort command. I have tried this and it's not sorting properly. what am i missing?
cat testing_sort
1:21
4:18
2:17
7:14
9:19
3:12
0:16
8:13
5:20
6:15
10:11
sort -t: -nk1,1 -nk2,2 testing_sort (4 Replies)
Hey everybody,
I'm trying to sort scientific numbers in a descending order using the command
sort -gr <file>.
It works fine on a Linux-Server, but doesn't on my macbook pro with OS X 10.10.3 (Yosemite).
I tried to sort the following:
6.38e-10
6.38e-10
1.80e-11
1.00e-10
1.48e-12
And... (9 Replies)
I have variable that contains multiple values of number and also include overpunch(i.e. # $ % etc) character so we want to replace it with numbers.
here are the example:
Code:
11500#.0#
28575$.5$
527#.7#
42".2"
2794 .4
2279!.9!
1067&.7&
926#.6#
2279!.9!
885".5"
11714$.4$
27361'.1'... (1 Reply)
Discussion started by: nadeemrafikhan
1 Replies
LEARN ABOUT DEBIAN
maphimbu
MAPHIMBU(1) User Commands MAPHIMBU(1)NAME
maphimbu - histogram builder for 1-d numerical and text data
SYNOPSIS
maphimbu [OPTION]... [FILE]
DESCRIPTION
This program produces 1-d histograms from numerical or text data input. It can be also used to estimate the probability distribution func-
tion of a numerical variable - see http://en.wikipedia.org/wiki/Probability_density_function.
OPTIONS -x <int>
x-data column (default is 1)
-y <int>
y-data column (default is 2); It is considered only when combined with '-m' or '-S'
-d <float|int>
delta size (dx-resolution) in case of numerical data; Keep in mind that 2 is not the same as 2.0: in the first case the numbers are
treated as integers, in the latter as floats.
-n normalize the result A) non-numerical data: n(x) = counts(x)/sum_of_counts B) numerical data: the normalized probability density
func.
is P(-INF < x <INF) = Int_[-INF:INF] P(x)*dx = 1 ; For the numerical integration an open x-data interval is assumed.
-N normalize data against the total sum of counts (same as option '-n' with case A forced)
-U normalize the result with x-range mapped to unit; The x-values are mapped to the interval [0:1], respectively Int_[0:1] P(x)*dx = 1;
This option is mutually exclusive with '-n'.
-S compute sums and normalized sums of y-values; The total sum of all y-values is used for the normalization.
-m compute the arithmetic mean of y-values in the respective x-bar
-s <int>
sort output using the specified column; Header is skipped in this case.
-g <int>
sort output numerically using the specified column; Header is skipped in this case.
-r do reverse sorting (in combination with '-g' and '-s')
-C center histogram bars (shifts x-axis by 0.5*dx)
-X treat hole line as one string (single data record)
-H print a data description header
-V print program version and exit
--version
output version and copyright information
--help display help
-h display short help (options summary)
Note: this program is not intended for use in high order numerical computations.
REPORTING BUGS
Report bugs to <gnu@mirendom.net>
COPYRIGHT
Copyright (C) 2003-2007, 2009, 2011 Dimitar Ivanov
License: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
maphimbu 2.8.4 February 2012 MAPHIMBU(1)