Sponsored Content
Full Discussion: Sorting Issue
Top Forums Shell Programming and Scripting Sorting Issue Post 302299320 by summer_cherry on Thursday 19th of March 2009 10:32:53 PM
Old 03-19-2009
Code:
sort -t"|" -n -r +5 filename

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix Arithmatic operation issue , datatype issue

Hi, I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ). Eg: 0000001 0000220 0001235 0000022 0000023 ........... ......... ........ Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies

2. Shell Programming and Scripting

Sorting :

Hi .... iam having a file with 20,000 rows and 56 colums. Iam trying to sort a file ....for that iam using 'sort' command. If iam having 3 and 5 key colums etc ... as numerical this 'sort' command will work? what ihave to do ? sample example : E100|0|19940102|1|11111|E003... (3 Replies)
Discussion started by: satyam_sat
3 Replies

3. UNIX for Dummies Questions & Answers

Issue on sorting

Hi, I have a file which has data as path/1.xml path/2.xml,...(each in separate lines) I want to sort this file in order. It is not working when I give "sort filename" The number of "/" in path can vary. Thanks, Floyd (1 Reply)
Discussion started by: asmfloyd
1 Replies

4. Shell Programming and Scripting

Sorting

I've been on holiday, and the brain's clearly not back in gear yet... On Solaris, I have a simple list of package names... DGBUpPost1.43_R1 DGSApp1.44_S1 DGSApp1.47_V1 DGSApp1.48_W0 DGPEuroC1.10_K0 DGPEuroC1.11_L0 DGPEuroC1.9_J0 DGSRet1.10_K0 I just want to properly sort them into... (2 Replies)
Discussion started by: JerryHone
2 Replies

5. Shell Programming and Scripting

Sorting issue with directory and file name

Hi All, My folder contains the files as: $ ls -lrt total 50 lms_prap_rf_20100422_99.xml lms_prap_rf_20100422_9.xml lms_prap_rf_20100422_100.xml lms_prap_rf_20100422_10.xml lms_prap_rf_20100426_1.xml I need to get the sorting of the above file based on numbers. I need first file in... (5 Replies)
Discussion started by: sreejitnair123
5 Replies

6. UNIX for Advanced & Expert Users

HELP on sorting

hi everyone, I am kind of new to this forum. I need help in sorting this data out accordingly, I am actually doing a traceroute application and wants my AS path displayed in front of my address like this; 192.168.1.1 AS28513 AS65534 AS5089 AS5089 .... till the last AS number and if possible... (1 Reply)
Discussion started by: sam127
1 Replies

7. Shell Programming and Scripting

sorting issue

I have files with the name myfile_YYMMDD.txt I need to sort them by their date stamp. I know this will work. ls -lrt * | awk '{print $9}' | cut -d "_" -f3 | sort However, it just returns YYMMDD.txt I can then append the myfile_ to it. However, that myfile_ may change. How do... (1 Reply)
Discussion started by: guessingo
1 Replies

8. Shell Programming and Scripting

Need assistance with a file issue and a terminal issue

Hello everyone, I'm in need of some assistance. I'm currently enrolled in an introductory UNIX shell programming course and, well halfway through the semester, we are receiving our first actual assignment. I've somewhat realized now that I've fallen behind, and I'm working to get caught up, but for... (1 Reply)
Discussion started by: MrMagoo22
1 Replies

9. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

10. Shell Programming and Scripting

Sorting issue

Hi All, I am working on a huge pile of data. Its about a service initiating a call and and finishing it. The columns that I have is: Date Time URL Call Type ServiceName 5/11/2015 15:00:00 http-/0.0.0.0:8091-9 going to... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies
SLAPO-VALSORT(5)						File Formats Manual						  SLAPO-VALSORT(5)

NAME
slapo-valsort - Value Sorting overlay to slapd SYNOPSIS
/etc/openldap/slapd.conf DESCRIPTION
The Value Sorting overlay can be used with a backend database to sort the values of specific multi-valued attributes within a subtree. The sorting occurs whenever the attributes are returned in a search response. Sorting can be specified in ascending or descending order, using either numeric or alphanumeric sort methods. Additionally, a "weighted" sort can be specified, which uses a numeric weight prepended to the attribute values. The weighted sort is always performed in ascending order, but may be combined with the other methods for values that all have equal weights. The weight is specified by prepending an integer weight {<weight>} in front of each value of the attribute for which weighted sorting is desired. This weighting factor is stripped off and not returned in search results unless the valsort control is specified (1.3.6.1.4.1.4203.666.5.14). The valsort control requires a value consisting of a Sequence that contains a boolean flag. The weighting factor is only returned if the boolean value is TRUE. In lber-encode(3) format, the required value must conform to "{b}" syntax. CONFIGURATION
These slapd.conf options apply to the Value Sorting overlay. They should appear after the overlay directive. valsort-attr <attribute> <baseDN> (<sort-method> | weighted [<sort-method>]) Configure a sorting method for the specified attribute in the subtree rooted at baseDN. The sort-method may be one of alpha-ascend, alpha-descend, numeric-ascend, or numeric-descend. If the special weighted method is specified, a secondary sort-method may also be specified. It is an error to specify an alphanumeric sort-method for an attribute with Integer or NumericString syntax, and it is an error to specify a numeric sort-method for an attribute with a syntax other than Integer or NumericString. EXAMPLES
database bdb suffix dc=example,dc=com ... overlay valsort valsort-attr member ou=groups,dc=example,dc=com alpha-ascend To invoke ldapsearch(1) with the valsort control, the control value must be set appropriately. The following octets represent the desired "{b}" encoding: 0x30 0x03 0x01 0x01 0xff The control can be sent from the command-line using the base64 encoding of the value: ldapsearch -E 1.3.6.1.4.1.4203.666.5.14=::MAMBAf8= FILES
/etc/openldap/slapd.conf default slapd configuration file SEE ALSO
slapd.conf(5), slapd-config(5). ACKNOWLEDGEMENTS
This module was written in 2005 by Howard Chu of Symas Corporation. The work was sponsored by Stanford University. OpenLDAP 2.4.39 2014/01/26 SLAPO-VALSORT(5)
All times are GMT -4. The time now is 10:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy