Sponsored Content
Top Forums UNIX for Advanced & Expert Users Need help for sorting in Unix Post 302403574 by srinu19 on Saturday 13th of March 2010 08:51:30 AM
Old 03-13-2010
Need help for sorting in Unix

Hi

I have a query regarding syncsort in Unix. What is the difference between Syncsort and normal sort. If I have 4 columns to do sort in a csv file and and first col, and third col to be done in descending order. How can I do that in Unix/

Please help me..Its urgent.
 

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
Xapian::Enquire(3pm)					User Contributed Perl Documentation				      Xapian::Enquire(3pm)

NAME
Search::Xapian::Enquire - Make queries against a database DESCRIPTION
This class provides an interface to the information retrieval system for the purpose of searching. METHODS
new set_query takes either a ready made Search::Xapian::Query or a scalar containing a query, which in that case will be passed to Search::Xapian::Query's constructor, together with any other passed arguments. set_query_object <query> get_query matches <start> <size> [<check_at_least>] Takes the start element, and maximum number of elements (and optionally the minimum number of matches to check), and returns an array tied to Search::Xapian::MSet::Tied. get_matching_terms_begin Returns a Search::Xapian::TermIterator, pointing to the start of the stream. get_matching_terms_end Returns a Search::Xapian::TermIterator, pointing to the end of the stream. set_collapse_key <collapse_key> set_docid_order <order> Set the direction in which documents are ordered by document id in the returned MSet. This order only has an effect on documents which would otherwise have equal rank. For a weighted probabilistic match with no sort value, this means documents with equal weight. For a boolean match, with no sort value, this means all documents. And if a sort value is used, this means documents with equal sort value (and also equal weight if ordering on relevance after the sort). order can be ENQ_ASCENDING (the default, docids sort in ascending order), ENQ_DESCENDING (docds sort in descending order), or ENQ_DONT_CARE (docids sort in whatever order is most efficient for the backend.) Note: If you add documents in strict date order, then a boolean search - i.e. set_weighting_scheme(Search::Xapian::BoolWeight->new()) - with set_docid_order(ENQ_DESCENDING) is a very efficient way to perform "sort by date, newest first". set_cutoff <percent_cutoff> [<weight_cutoff>] set_sort_by_relevance Set the sorting to be by relevance only. This is the default. set_sort_by_value <sort_key> [<ascending>] Set the sorting to be by value only. sort_key - value number to reorder on. Sorting is with a string compare. If ascending is true (the default) higher is better; if ascending is false, lower is better. ascending - If true, document values which sort higher by string compare are better. If false, the sort order is reversed. (default true) set_sort_by_value_then_relevance <sort_key> [<ascending>] Set the sorting to be by value, then by relevance for documents with the same value. sort_key - value number to reorder on. Sorting is with a string compare. If ascending is true (the default) higher is better; if ascending is false, lower is better. ascending - If true, document values which sort higher by string compare are better. If false, the sort order is reversed. (default true) set_sort_by_relevance_then_value <sort_key> [<ascending>] Set the sorting to be by relevance then value. Note that with the default BM25 weighting scheme parameters, non-identical documents will rarely have the same weight, so this setting will give very similar results to set_sort_by_relevance(). It becomes more useful with particular BM25 parameter settings (e.g. BM25Weight(1,0,1,0,0)) or custom weighting schemes. sort_key - value number to reorder on. Sorting is with a string compare. If ascending is true (the default) higher is better; if ascending is false, lower is better. ascending - If true, document values which sort higher by string compare are better. If false, the sort order is reversed. (default true) set_sort_by_key <sorter> [<ascending>] Set the sorting to be by key only. sorter - the functor to use to build the key. ascending - If true, keys which sort higher by string compare are better. If false, the sort order is reversed. (default true) set_sort_by_key_then_relevance <sorter> [<ascending>] Set the sorting to be by key, then by relevance for documents with the same key. sorter - the functor to use to build the key. ascending - If true, keys which sort higher by string compare are better. If false, the sort order is reversed. (default true) set_sort_by_relevance_then_key <sorter> [<ascending>] Set the sorting to be by relevance then key. sorter - the functor to use to build the key. ascending - If true, keys which sort higher by string compare are better. If false, the sort order is reversed. (default true) get_mset Get match set. get_eset <maxitems> <rset> [<decider>] Get set of query expansion terms. get_description Return a description of this object. SEE ALSO
Search::Xapian::Query, Search::Xapian::Database perl v5.14.2 2012-05-09 Xapian::Enquire(3pm)
All times are GMT -4. The time now is 03:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy