Wow, thanks allot for working this out. This will really save me allot of time. It looks like it would be reasonable to make simple changes, like to alphanumeric sorting, or to change the sort order.
After a few changes to make this into a callable script run in bash, this is what I ended up with.
I have a local sort file with the list of headers to sort on, and this scripts lives with the rest of my path tools (/usr/local/bin/) so I can call it from the shell or another script.
Hi friends,
I want to use sort command in script. I used the following syntax in my scipt,
sort -t '|' +3 tempcdrext4.cdr > temp.mocdr
It give me a error " Input file specified two times."
but this command work fine in the prompt without any problem.
Can sombody please tell me who... (2 Replies)
ok.
i am doing a project where i have hand typed in the titles of nearly 500 DVD titles, each one is on a seperate line.
but they arent in any type of alphebetical order, and i need them sorted in that format (A-Z or a-z) .....
i know that the 'sort' command can be used but also know the... (6 Replies)
Hi All,
I have a .csv file with 3 columns called nLats, nLongs, and fRes. in following format :
"nLats","nLongs","fRes"
0,0,-1
0,1,-1
0,2,-1
0,3,-1
0,4,-1
.........
.........
0,143,-1 nLats increments at nLongs=143
1,0, -1
1,1, -1
..........
..........
1,143,-1... (1 Reply)
I have a file with four fields and an awk script that strips out one field displaying the remaining three. I have added headings for each of these fields such as Player - Year - RBIs then below it comes the data. What I am trying to do is sort the RBIs field in my script from most to least at the... (9 Replies)
Hi i have a file like this
oprvdw vrc002093j.ksh
oprvdw vrc002092j.ksh
oprvrc vrc045016j.ksh
oprvrc vrc055141j.ksh
svemietl bdw0231185.sh
svemietl bdw0231145.sh
and i need a script which dispalys in below format:
oprvdw :
vrc002093j.ksh
vrc002092j.ksh
oprvrc :... (0 Replies)
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
hi guys
i looking for someone to help me with a script
i want to sort all de files from /bin by size (from max to min) and the size and path of first 3 files to be written in /home/user/bin_size .And i want to put that script in crontab to execute every monday at 20:00
Can someone help me... (2 Replies)
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Hi geeks!
I want to convert the following:
EPC-NotificationData: sms:2348034503643
EPC-GroupIds: 300H:10:22-01-2014T07:30:14,22-04-2014T07:30:14
To:
EPC-NotificationData: sms:2348034503643, EPC-GroupIds: 300H:10:22-01-2014T07:30:14,22-04-2014T07:30:14
I want them to be on the same... (13 Replies)
I'm trying to create a shell script that takes a awk script that I wrote and a filename as an argument. I was able to get that done but I'm having trouble figuring out how to keep the header of the output at the top but sort the rest of the rows alphabetically. This is what I have now but it is... (1 Reply)
Discussion started by: Eric7giants
1 Replies
LEARN ABOUT DEBIAN
search::xapian::enquire
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)