Sponsored Content
Full Discussion: Sorting problem
Top Forums UNIX for Dummies Questions & Answers Sorting problem Post 302529056 by vgersh99 on Wednesday 8th of June 2011 11:41:12 AM
Old 06-08-2011
as for the second point:
Code:
nawk -F';' '$4!~"No." {n=split($1,f1, "[,()]"); if (f1[n-1] != "2006") next;for(i=1;i<n-1;i++) {match(f1[i], "[A-Za-z][A-Za-z]*");print substr(f1[i],RSTART, RLENGTH)}}' lit.csv

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem in sorting the file

file format is word filename no.of occurances ------------------------------ wish f3.txt 2 wish f2.txt 1 cold f1.txt 5 cold f2.txt 3 cold f1.txt 3 cold e.txt 3 gold f1.txt 7 gold f3.txt 3 rush e.txt 2 itz abt building a search index for every word in the files given as input the... (1 Reply)
Discussion started by: vishnu_vaka
1 Replies

2. Shell Programming and Scripting

Sorting/Filed Defining/Output problem

need a little help with a few tid bits. I wrote a script that checks the resoluion of image files and writes them out to a file then sorts the resolutions by largets Width. Then take the sorted files information and toss all the 835 widths into a seperate file. Ignore the redundancies its a... (1 Reply)
Discussion started by: TiredOrangeCat
1 Replies

3. Shell Programming and Scripting

sorting/arrangement problem

Hi, I have the following 'sorting' problem. Given the input file: a:b:c:12:x:k s:m:d:8:z:m a:b:c:1:x:k p:q:r:23:y:m a:b:c:3:x:k p:q:r:1:y:m the output I expect is: a:b:c:1:x:k p:q:r:1:y:m s:m:d:8:z:m What happened here is I grouped together lines having the same values for... (7 Replies)
Discussion started by: Abhishek Ghose
7 Replies

4. HP-UX

Sorting problem....

hey mate. ive got a sorting problem that i would like to share... i made a script that sorts the bdf command and redirected the output to a file. the output of the file is: 691416 34% / 851552 7% /stand 7203048 31% /var 23637584 26% /var/adm/crash 2968864 ... (4 Replies)
Discussion started by: jarod004
4 Replies

5. UNIX for Dummies Questions & Answers

Sorting problem

Hai , In unix we are going to sort it out all the directories and files based on size of the file. For that we have to use this command ls -al | sort +4nr. If we are giving this command means it will show all the records in a descending order....when I am checking one file bytes its... (4 Replies)
Discussion started by: cool4naren
4 Replies

6. Shell Programming and Scripting

Sorting problem (SunOS 5.9 / KSH).

Hi, Can someone tell me why the "LargeFile" is coming first before the smaller files. Is there any way to list the files based on size column. ls -g| sort -k 4 -rw-r--r-- 1 user 6117910528 Apr 28 15:04 LargeFile -rw-r--r-- 1 user 6136832 May 30 07:23 my_20080530.tar -rw-r--r-- ... (2 Replies)
Discussion started by: kesari
2 Replies

7. UNIX for Dummies Questions & Answers

Sorting file with columns (problem)

Hi all! I am new to Unix programming so bare with me please :). I have saved the output of my results in a file called testfile which contains 3 columns a 15 rows. e.g. 175 754 abvd 948 454 fewf 43 754 fewc 6 734 feww xxx xxx xxxx I want to sort the contents of this file... (10 Replies)
Discussion started by: daelas
10 Replies

8. UNIX Desktop Questions & Answers

Problem in sorting a text file

Hi; I have a text file like this: 1 10 11 2 3 4 M X Y When I sort it numerically using sort -n, it looks like this: Y X M 1 2 3 4 10 (3 Replies)
Discussion started by: a_bahreini
3 Replies

9. UNIX for Advanced & Expert Users

Sorting problem

I have data like this in file Now I have to sort using second column(usage) and i should get first column against it post sorting please provide input (2 Replies)
Discussion started by: mirwasim
2 Replies

10. UNIX for Dummies Questions & Answers

Problem with sorting in shell script

Hi, I have the following list: 42A 42AA 42B 42BB 42AAA 42BBB 49A 49AA 49B 49AAA 49BB I need it to be sorted as following: 42A 42B (2 Replies)
Discussion started by: sairamtejaswi
2 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 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy