...
@Drl - one of our senior people, may mention getting a linux package for date operations, one of the commands is "dsort" which does exactly what the code above does. Hopefully he will mention where to download it. I do not know
The code is available in some repositories (I just installed it in a VM for Debian Buster), and also at github, as newer versions 0.4.3 .. 0.4.7:
This is from my system:
ALthough this has been solved, if I get some time I'll try to post a solution with dateutils ... cheers, drl
I check the man page but I still cannot see what this command is supposed to do
sort +5 -6 <file>
It just seems to sort the file as normal??
Thanks
Calypso (3 Replies)
Hi to all.
I'm trying to sort this with the Unix command sort.
user1:12345678:3.5:2.5:8:1:2:3
user2:12345679:4.5:3.5:8:1:3:2
user3:12345687:5.5:2.5:6:1:3:2
user4:12345670:5.5:2.5:5:3:2:1
user5:12345671:2.5:5.5:7:2:3:1
I need to get this:
user3:12345687:5.5:2.5:6:1:3:2... (7 Replies)
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
sort --random-sort
The full command is
path=`find /testdir -maxdepth 1 -mindepth 1 -type d | ***Some sort of sort function*** | head -1`
I have a list I want to randomly sort. It works fine in ubuntu but on a 'osx lion' sort dosen't have the --random-sort option.
I don't want to... (5 Replies)
Input file:
100%ABC2 3.44E-12 USA
A2M%H02579 0E0 UK
100%ABC2 5.34E-8 UK
100%ABC2 3.25E-12 USA
A2M%H02579 5E-45 UK
Output file:
100%ABC2 3.44E-12 USA
100%ABC2 3.25E-12 USA
100%ABC2 5.34E-8 UK
A2M%H02579 0E0 UK
A2M%H02579 5E-45 UK
Code try:
sort -k1,1 -g -k2 -r input.txt... (2 Replies)
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Hi,
Could anyone kindly show me a link or explain the difference between
sort -n -k2 -k3 & sort -n -k2,3
Also, if I like to remove the row with repetition at both $2 and $3, Can I safely use
sort -u -k2 -k3
Example;
100 20 30
100 20 30
So, both $2 and $3 are same and I... (2 Replies)
How to sort the following output based on lowest to highest BE?
The following sort does not work.
$ sort -t. -k1,1n -k2,2n bfd.txt
BE31.116 0s 0s DOWN DAMP
BE31.116 0s 0s DOWN DAMP
BE31.117 0s 0s ... (7 Replies)
Discussion started by: sand1234
7 Replies
LEARN ABOUT DEBIAN
cz::sort
Cz::Sort(3pm) User Contributed Perl Documentation Cz::Sort(3pm)NAME
Cz::Sort - Czech sort
SYNOPSIS
use Cz::Sort;
my $result = czcmp("_x j&a", "_&p");
my @sorted = czsort qw(plachta plaoka Planieka planieka plani);
print "@sorted
";
DESCRIPTION
Implements czech sorting conventions, indepentent on current locales in effect, which are often bad. Does the four-pass sort. The idea and
the base of the conversion table comes from Petr Olsak's program csr and the code is as compliant with CSN 97 6030 as possible.
The basic function provided by this module, is czcmp. If compares two scalars and returns the (-1, 0, 1) result. The function can be called
directly, like
my $result = czcmp("_x j&a", "_&p");
But for convenience and also because of compatibility with older versions, there is a function czsort. It works on list of strings and
returns that list, hmm, sorted. The function is defined simply like
sub czsort
{ sort { czcmp($a, $b); } @_; }
standard use of user's function in sort. Hashes would be simply sorted
@sorted = sort { czcmp($hash{$a}, $hash{$b}) }
keys %hash;
Both czcmp and czsort are exported into caller's namespace by default, as well as cscmp and cssort that are just aliases.
This module comes with encoding table prepared for ISO-8859-2 (Latin-2) encoding. If your data come in different one, you might want to
check the module Cstocs which can be used for reencoding of the list's data prior to calling czsort, or reencode this module to fit your
needs.
VERSION
0.68
SEE ALSO perl(1), Cz::Cstocs(3).
AUTHOR
(c) 1997--2000 Jan Pazdziora <adelton@fi.muni.cz>, http://www.fi.muni.cz/~adelton/
at Faculty of Informatics, Masaryk University, Brno
perl v5.10.1 2000-05-16 Cz::Sort(3pm)