I would like to arrange /sort filenames ending with suffix like ".00XXXX". where X is a digit. However the order of arrangement is in a text file and is 'harpharzard'. e.g the text file may be like
002345
009807
001145
I wanted to avoid doing this using sql and exporting the text file back to... (4 Replies)
I have a vector of strings that contain a list of channels like this:
101,99,22HD,432,300HD
I have tried using the sort routine like this:
sort(mychans.begin(),mychans.end());
For some reason my channels are not being sorted at all. I was hoping someone might have some input that might... (2 Replies)
Hi forum.
I'm hoping someone can help me out with this problem. I tried to search online but couldn't come up with an exact solution.
I have the following data file:
H|20-May-2011|MF_FF.dat|77164|731374590.96|1|1|731374590.96|76586|77164|578|2988|Y... (8 Replies)
I am trying to sort the output in decreasing order of the process ID while using the ps command. I am having trouble doing this using the --sort part of ps.
Also I was wondering if anyone knows what the "S" stands for under the process's status code? (3 Replies)
Hi,
I have this single file with a number of sequence inside it of format
>string1
data
>string100
data
>string10
.....
>string5
...
>string67
......
the dots represent data.
I wanted to get the sequences arranged in ascending order like
>string1
data
>string5 (5 Replies)
Hello,
I have a large database of words and would like them sorted in reverse order i.e. from the end up.
An example will make this clear:
I have tried to write a program in Perl which basically takes the string from the end and tries to sort from that end but it does not seem... (5 Replies)
Hi, need help in sorting lines between strings "<section status = “ole-service”>" and "</section>" in alphabetical order, based on the text in red. Hoping for an AWK or SED solution. Thank you.
...
<section status = “ole-service”>...
<p service = "OOO">XZZ</p>
<p service = "AAA">AAA... (3 Replies)
I am working on a web-concordance of Old Avestan and my concordance has produced a HTML file
The sort deployed by the HTML file is not something which we normally use. I have tried my best to force a sort within the concordance itself, but the sort order does not work.
I am giving below the sort... (6 Replies)
I have a unix script that outputs a summary file to the mac desktop.
The file is called summary.txt
I am trying to configure such so that the summary.txt file lists the content contained within such in reverse sort order.
I have used sort -r but it does not seem to work.
I would be... (8 Replies)
Discussion started by: Braveheart
8 Replies
LEARN ABOUT OSX
psort_b
PSORT(3) BSD Library Functions Manual PSORT(3)NAME
psort, psort_b, psort_r -- parallel sort functions
SYNOPSIS
#include <stdlib.h>
void
psort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *));
void
psort_b(void *base, size_t nel, size_t width, int (^compar)(const void *, const void *));
void
psort_r(void *base, size_t nel, size_t width, void *thunk, int (*compar)(void *, const void *, const void *));
DESCRIPTION
The psort(), psort_b(), and psort_r() functions are parallel sort routines that are drop-in compatible with the corresponding qsort() func-
tion (see qsort(3) for a description of the arguments). On multiprocessor machines, multiple threads may be created to simultaneously per-
form the sort calculations, resulting in an overall faster sort result. Overhead in managing the threads limits the maximum speed improve-
ment to somewhat less that the number of processors available. For example, on a 4-processor machine, a typical sort on a large array might
result in 3.2 times faster sorting than a regular qsort().
RESTRICTIONS
Because of the multi-threaded nature of the sort, the comparison function is expected to perform its own synchronization that might be
required for data physically outside the two objects passed to the comparison function. However, no synchronization is required for the two
object themselves, unless some third party is also accessing those objects.
Additional memory is temporary allocated to deal with the parallel nature of the computation.
Because of the overhead of maintaining multiple threads, the psort() family of routines may choose to just call qsort(3) when there is no
advantage to parallelizing (for example, when the number of objects in the array is too small, or only one processor is available).
Like qsort(3), the sort is not stable.
RETURN VALUES
The psort(), psort_b() and psort_r() functions return no value.
SEE ALSO qsort(3)Mac OS X Nov 25, 2008 Mac OS X