Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Is it possible to get the same result in one sort? Post 303046183 by RudiC on Monday 27th of April 2020 09:18:21 AM
Old 04-27-2020
Try
Code:
sort  -t. -k1,1 -k2n file

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Outputting formatted Result log file from old 30000 lines result log<help required>

Well I have a 3000 lines result log file that contains all the machine data when it does the testing... It has 3 different section that i am intrsted in 1) starting with "20071126 11:11:11 Machine Header 1" 1000 lines... "End machine header 1" 2) starting with "20071126 12:12:12 Machine... (5 Replies)
Discussion started by: vikas.iet
5 Replies

2. UNIX for Dummies Questions & Answers

display the result of wc -l with words before and after the result

hello showrev -p | wc -l returns: 381 What to do in case I want to have this output: number of lines returned by showrev -p is: 381 thx (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

3. UNIX for Advanced & Expert Users

Script to sort the files and append the extension .sort to the sorted version of the file

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)
Discussion started by: pankaj80
3 Replies

4. Shell Programming and Scripting

sort, columns, no result! can I print files of "planes"?

hi, please can I ask you for some help? I have data from 3D situation, x y z value I'd like to use gnuplot to generate maps of the value in the planes z=0 to z=1 for example, my file looks like -0,012 0,0060 0,0 0,13972813076023477 -0,012 0,0064319163 4,2894483E-4 ... (1 Reply)
Discussion started by: kocour
1 Replies

5. UNIX for Dummies Questions & Answers

Weird: unexpected result after piping a sort

Hello, And when you think you know the basics of something, UNIX in this case, something like what I will describe below comes along.... On a Linux system, a "typical" directory with some files. Say 20. I do: > ls | sort > mylisting Now when I: > vi mylisting There is mylisting... (13 Replies)
Discussion started by: stavros
13 Replies

6. Shell Programming and Scripting

Help with sort word and general numeric sort at the same time

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)
Discussion started by: perl_beginner
2 Replies

7. Shell Programming and Scripting

Sort help: How to sort collected 'file list' by date stamp :

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)
Discussion started by: rveri
3 Replies

8. Shell Programming and Scripting

How to sort grep result based on timestamp?

Hi, Trying to sort grep result based on timestamp of the filename. I have the following result and want to sort them on timestampgrep -i 'ERROR' *log*2013* s_m_xxx_xxx_xxx_xxx_xxxx.log.20130906092431:TRANSF_1_1_1> DBG_21216 Finished transformations for Source Qualifier . Total errors ... (5 Replies)
Discussion started by: bobbygsk
5 Replies

9. Shell Programming and Scripting

How to compare the current result with previous line result.?

Hi Gurus, I have requirement to compare current result with previous reuslt. The sample case is below. 1 job1 1 1 job2 2 1 job3 3 2 job_a1 1 2 job_a2 2 2 job_a3 3 3 job_b1 1 3 job_b2 2 for above sample file, GID is group ID, for input line, the job run... (1 Reply)
Discussion started by: ken6503
1 Replies

10. UNIX for Beginners Questions & Answers

Sort by record column, Compare with conditons and export the result

Hello, I am new to Unix and would like to seek a help, please. I have 2 files (file_1 and file_2), I need to perform the following actions. 1 ) Sort the both file by the column 26-36 (which is Invoice number) what is sort command with the column sort? 2) Compare the file_1.sorted and... (3 Replies)
Discussion started by: Usagi
3 Replies
Net::LDAP::Control::SortResult(3)			User Contributed Perl Documentation			 Net::LDAP::Control::SortResult(3)

NAME
Net::LDAP::Control::SortResult - Server Side Sort (SSS) result control object SYNOPSIS
use Net::LDAP::Control::Sort; use Net::LDAP::Constant qw(LDAP_CONTROL_SORTRESULT); use Net::LDAP::Util qw(ldap_error_name); $sort = Net::LDAP::Control::Sort->new( order => "cn -age" ); $mesg = $ldap->search( @args, control => [ $sort ]); ($resp) = $mesg->control( LDAP_CONTROL_SORTRESULT ); if ($resp) { if ($resp->result) { my $attr = $resp->attr; print "Problem sorting, ",ldap_error_name($resp->result); print " ($attr)" if $attr; print " "; } else { print "Results are sorted "; } } else { print "Server does not support sorting "; } DESCRIPTION
"Net::LDAP::Control::SortResult" is a sub-class of Net::LDAP::Control. It provides a class for manipulating the LDAP sort request control 1.2.840.113556.1.4.474 as defined in RFC-2891 A sort result control will be returned by the server in response to a search with a Server Side Sort control. If a sort result control is not returned then the user may assume that the server does not support sorting and the results are not sorted. CONSTRUCTOR ARGUMENTS
attr If "result" indicates that there was a problem with sorting and that problem was due to one of the attributes specified in the sort control. "attr" is set to the name of the attribute causing the problem. result This is the result code that describes if the sort operation was successful. If will be one of the result codes describes below. METHODS
As with Net::LDAP::Control each constructor argument described above is also available as a method on the object which will return the current value for the attribute if called without an argument, and set a new value for the attribute if called with an argument. RESULT CODES
Possible results from a sort request are listed below. See Net::LDAP::Constant for a definition of each. LDAP_SUCCESS LDAP_OPERATIONS_ERROR LDAP_TIMELIMIT_EXCEEDED LDAP_STRONG_AUTH_REQUIRED LDAP_ADMIN_LIMIT_EXCEEDED LDAP_NO_SUCH_ATTRIBUTE LDAP_INAPPROPRIATE_MATCHING LDAP_INSUFFICIENT_ACCESS LDAP_BUSY LDAP_UNWILLING_TO_PERFORM LDAP_OTHER SEE ALSO
Net::LDAP, Net::LDAP::Control::Sort, Net::LDAP::Control, http://ww.ietf.org/rfc/rfc2891.txt AUTHOR
Graham Barr <gbarr@pobox.com> Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org> COPYRIGHT
Copyright (c) 1999-2004 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-07-21 Net::LDAP::Control::SortResult(3)
All times are GMT -4. The time now is 07:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy