Sponsored Content
Top Forums UNIX for Advanced & Expert Users Need help for sorting in Unix Post 302405317 by glev2005 on Thursday 18th of March 2010 12:57:00 PM
Old 03-18-2010
awk might work for what you want, but if you dont post your data, it is hard to give you an accurate line to do what you want.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sorting Program In UNIX

Write a shell program that takes one or any number of file names as input; sorts the lines of each file in ascending order and displays the non blank lines of each sorted file and merge them as one combined sorted file. The program should generate an error message in case any input file does not... (1 Reply)
Discussion started by: kumar_saurabh
1 Replies

2. UNIX for Advanced & Expert Users

Sorting in unix using column number

Hi All, Can anyone tell me how to sort data in a file using the “sort” command? Note that the records in the data file are not separated into fields. I know only the column positions of the data on which sorting should be done. For example say I've to sort based on the data present in between... (1 Reply)
Discussion started by: swat
1 Replies

3. Shell Programming and Scripting

ascii sorting in unix

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)
Discussion started by: sais
1 Replies

4. UNIX Desktop Questions & Answers

need unix script for sorting

Hi All, I am new to unix,please help me on the following its urgent I have 2 question 1 question I need a script for following senario I have get some files in directory by using grep i need to sort all files to new files for example (abc.dat --> abc.dat.sort) ex:grep *050508* ... (3 Replies)
Discussion started by: cgreddy2020
3 Replies

5. Shell Programming and Scripting

unix sorting

Hi experts, i have a file.If i will delete some intermediate records from the file then the output file will be in sorted format as show below. file A ==== D001 ty gh D002 fg hi D003 jk lr . . . if i will delete the 2nd record then the output file is as follows: outputfile:... (1 Reply)
Discussion started by: subhendu81
1 Replies

6. UNIX and Linux Applications

UNIX sorting - csv file

Hi, Please help me to solve sorting in CSV file. I have 25 columns in my CSV. (Delimiter is ",") Summary columns are from 10 to 13 which are should not be sorted. From 1-9 and 14-25 should be able to sort in ascending. how should i do this using Sort command in unix. If no simple commands pls... (0 Replies)
Discussion started by: rajani_p
0 Replies

7. UNIX for Dummies Questions & Answers

Sorting in Unix

Hi I'm writing a shell that goes through a bunch of files and does a simple test on each. Each file has a numeric name (ex. 100.jpg). My problem is that the shell is going through the files in alphabetical rather than numeric order. Thus, after checking file 19.jpg it skips to 100.jpg. Once... (7 Replies)
Discussion started by: Bengel
7 Replies

8. Shell Programming and Scripting

string sorting in unix

Hi I need how to sort string characters for Example i have a file that contains this data example string "fan" but i want to display "afn" contained words "afn" is in sorted format for fan. File data faty gafny gaifny dafan gafnniunt O/p gafny gafnniunt (3 Replies)
Discussion started by: polineni
3 Replies

9. Shell Programming and Scripting

sorting in UNIX

hi experts, I have a flat file with 2 fields, 1st field is alpha-numeric and 2nd is numeric. Input file is :: A_0 11 A_0 12 A_0 13 C_0 3 B_1 21 B_1 22 A_0 1 A_0 2 I want to sort this file, first based on 1st field, then on 2nd field Output should be :: A_0 1 A_0 2 A_0 11... (1 Reply)
Discussion started by: sandeepkmehra
1 Replies

10. Shell Programming and Scripting

sorting files in unix

Hi , I have following error files in /srv/trillium/Projects/SAS_AML/logs dir. srtforpm_p3.err tranfrmr_p1.err tranfrmr_p9.err winkey_p5.err tranfrmr_p10.err srtforrl_p15.err tranfrmr_p6.err srtforrl_p7.err tranfrmr_p8.err tranfrmr_p14.err tranfrmr_p13.err tranfrmr_p12.err... (3 Replies)
Discussion started by: sonu_pal
3 Replies
SLAPO-VALSORT(5)						File Formats Manual						  SLAPO-VALSORT(5)

NAME
slapo-valsort - Value Sorting overlay to slapd SYNOPSIS
/etc/ldap/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 never returned in search results. 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 FILES
/etc/ldap/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 2012/04/23 SLAPO-VALSORT(5)
All times are GMT -4. The time now is 03:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy