Actually the cat is useless, and you can use sort -u to avoid the uniq. You probably want numeric sort anyway.
Your example suggests you want the last three numbers (i.e. simply tail -n 3 file), not the sorted output. The last three numbers from an ascending sort would be 382, 432, and 433 from the sample input you provided.
Hi All,
I am encountered with a problem while sorting a file based on multiple columns . I need to sort like:
(field2,ascending) , (field3,ascending) ,(field8,descending) , (field7,ascending),(field13,ascending).
So far i was sorting only in ascending order but here i need to use one... (1 Reply)
hi all
i want to remove some descending order number
example :
1 100 200 135.00 Gk_wirs 1
1 100 200 136.00 Gk_wirs 50
1 110 210 138.00 Gk_wirs 60
1 100 200 136.00 Gk_wirs 57 ----> how to remove... (6 Replies)
I have a text file where I want to append a column of numbers in ascending orders.
Input:
57 abc
25 def
32 ghi
54 jkl
Output:57 abc
57 abc 1
25 def 2
32 ghi 3
54 jkl 4
How do I go about doing that? Thanks! (11 Replies)
Hi,
I am trying to sort the following file in descending order of its fourth column.
2 1 363828 -2.423225e-03
3 1 363828 4.132763e-03
3 2 363828 8.150133e-03
4 1 363828 4.126890e-03
I use
sort -k4,4g -r input.txt > output.txt ... (1 Reply)
Hi,
I have a problem . I have few directories like inpTDT_1, inpTDT_2, inpTDT_3 and so on inside HOME directory . In one of my perl script (which is in my HOME), the above directories like inpTDT_1, inpTDT_2, inpTDT_3 are sorting out in an order So I wanted to sort all the inpTDT_1, inpTDT_2,... (1 Reply)
Discussion started by: venkatesh
1 Replies
LEARN ABOUT DEBIAN
dcsort
DCSORT(1) DICOM PS3 - Make sorted list of images DCSORT(1)NAME
dcsort - ACR/NEMA DICOM PS3 ... DICOM PS3 - Make sorted list of images
SYNOPSIS
dcsort " inputfile1 [ inputfile2 ... ]" [ -v|verbose ] [ -vv|veryverbose ] [ -vvv|veryveryverbose ] [ -index ] [ -show ] [ -interval ] [
-tolerance mm ] [ -check ] [ -checkFoR ] [ -descending ] [ -sortby|k attributename ]
DESCRIPTION
dcsort reads the named dicom input files and sorts them by the specified sort key.
The sort key should be a single valued numeric attribute, with the exception of ImageOrientationPatient and ImagePositionPatient which are
handled as special cases.
There is no output by default unless the index or verbose options are specified.
OPTIONS
The output and errors go to standard error.
The basic input switches are described in dcintro(1). Options specific to this program are:
-index
Creates a first column of output that is the index in the sort order, starting from 0, and a second column that is the filename.
-show
Show the value of the sort key after the file name with the -index option
-interval
Show the interval between values of the sort key, or an error if not equal
-tolerance mm
The tolerance value in mm to use when comparing intervals between slices; defaults to +/- 0.01 mm if unspecified
-check
Check that all the images are from the same series.
-checkFoR
Check that all the images have the same Frame of Reference (UID).
-descending
Sort in descending, rather than the default ascending, order.
-sortby|k attributename
Specify attributename as the sort key.
ENVIRONMENT EXAMPLES
% dcsort -index -sortby SliceLocation ./1/[0-9]*
0 ./1/1
1 ./1/2
FILES SEE ALSO dcintro(1)AUTHOR
Copyright (C) 1993-2010. David A. Clunie DBA PixelMed Publishing. All rights reserved.
BUGS DICOM PS3 22 December 2006 DCSORT(1)