Sort Old Style Key Definition


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Sort Old Style Key Definition
# 1  
Old 03-21-2008
Data Sort Old Style Key Definition

Hello guys,

I am quite confused with old style key definitions.

Below is the example:

sort -o $sortfile +0.75 -0.84 $input

According to the manual, the key field should start at 75th character of the 1st(0+1) field and key's last position should be 84th character after end of "0"th field

Can anyone explain me what is the "0"th field and how actually the key is defined in the case above Smilie

Also, please tell me what happens if the key definition exceeds the range of input file ( for example if the longest line is or 40 character, and i define the key from 80-85) Smilie

Thanks in advance!!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

Get struct definition

I have many headers with huge amount of structures in them, typical one looks like this: $ cat a.h struct Rec1 { int f1; int f2; }; struct Rec2 { char r1; char r2; }; struct Rec3 { int f1; float k1; float ... (6 Replies)
Discussion started by: migurus
6 Replies

2. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

3. UNIX for Dummies Questions & Answers

Definition of $-

Could someone please direct me to a link that gives the definitions for each of the letters from the results of the $- environment variable? It would be nice to know what shell options each of the letters represents, but I am specifically looking for the shell option for 'c' (lowercase c). Thank... (12 Replies)
Discussion started by: sszd
12 Replies

4. Shell Programming and Scripting

Perl function to sort a file based on key fields

Hi, I am new to PERL.I want to sort all the lines in a file based on 1,2 and 4th filelds. Can U suggest me a command/function in perl for this operation.. (5 Replies)
Discussion started by: karthikd214
5 Replies

5. Shell Programming and Scripting

daemons definition

hi there, can somebody give me a definition for daemons, or example what are they !! and what the use for? i've done some research and all what i found is /etc/... or /usr/bin/... and i haven't quietly got the concept. any ideas !! Thanks. (5 Replies)
Discussion started by: new2Linux
5 Replies

6. UNIX for Dummies Questions & Answers

Pressing backspace key simulates enter key

Hi, Whenever i press the backspace key, a new line appears, i.e. it works like a enter key. :confused: Thanks (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies

7. UNIX for Dummies Questions & Answers

2nd sort key

Hi, I was trying to sort a file with one sort key in the first field and trying to sort again based on the 2nd field. After the sort command , the first sorted file will look like this: 1 apple OH 2 pear OH 3 pear IL 4 apple FL 5 pear FL 6 apple MI I'd like to have it sort on the 2nd... (1 Reply)
Discussion started by: whatisthis
1 Replies

8. Post Here to Contact Site Administrators and Moderators

New Style

Hi, I pop in here every so oftern and was suprised to see the changes in colour. I think the new style/colour is great :D (1 Reply)
Discussion started by: Ralf
1 Replies
Login or Register to Ask a Question
YAZ_SORT(3)								 1							       YAZ_SORT(3)

yaz_sort - Sets sorting criteria

SYNOPSIS
void yaz_sort (resource $id, string $criteria) DESCRIPTION
This function sets sorting criteria and enables Z39.50 Sort. Call this function beforeyaz_search(3). Using this function alone does not have any effect. When used in conjunction with yaz_search(3), a Z39.50 Sort will be sent after a search response has been received and before any records are retrieved with Z39.50 Present (yaz_present(3). PARAMETERS
o $id - The connection resource returned by yaz_connect(3). o $criteria - A string that takes the form field1 flags1 field2 flags2 where field1 specifies the primary attributes for sort, field2 seconds, etc.. The field specifies either a numerical attribute combinations consisting of type=value pairs separated by comma (e.g. 1=4,2=1) ; or the field may specify a plain string criteria (e.g. title. The flags is a sequence of the following characters which may not be separated by any white space. Sort Flags o a - Sort ascending o d - Sort descending o i - Case insensitive sorting o s - Case sensitive sorting RETURN VALUES
No value is returned. EXAMPLES
Example #1 Sort Criterias To sort on Bib1 attribute title, case insensitive, and ascending you would use the following sort criteria: 1=4 ia If the secondary sorting criteria should be author, case sensitive and ascending you would use: 1=4 ia 1=1003 sa PHP Documentation Group YAZ_SORT(3)