Hi All,
I want to sort a flat file which will contain millions of records based on a key/field. For this I want to use unix sort command and before that I want to make sure that unix sort command has any file size limitations. And also please let me know whether I have to change any... (1 Reply)
Hi All,
I want to sort a flat file which will contain millions of records based on a key/field. For this I want to use unix sort command and before that I want to make sure that unix sort command has any file size limitations. And also please let me know whether I have to change any... (2 Replies)
I am converting mainframes JCL to be used in shell on a one to one basis... when i use the sort command unix does ascii sort as a result which numbers are first followed by charecters in the Ascending sort ... but themainframes uses the EBCDIC as result gives the charecters followed by numbers in... (5 Replies)
Hey guys.
I am trying to sort a file by account number through UNIX. I have a few things but it seems to sort by account number AND sort everything after the account number.
Help please.
Thanks (5 Replies)
I was trying to check for the sort of some columns (say 1-10) of particular file. Now, by default, the Unix sort uses as a separator whitespace (e.g. if you have 'foo bar' then it separates it into 'foo' and 'bar' to use as keys)
Now, I know which particular columns I want to use as the sort... (1 Reply)
Hi I am having some difficulties with the UNIX sort command.
I want to sort one a file that looks like this (file A):
tiger 5 6 3 5 2
bear 4 5 2 1 8
lions 9 2 5 3 1
dogs 8 5 3 3 1
acccording to a file that looks like this (file B):
dogs
lions
tiger
bear
So... (2 Replies)
Need some help with the sort command. I have a large file which needs sorted on the third field separated by : and within the third field, I need it sorted by second field or everything after the . An example of my file is here and for example, the first line I need :ROUTER2.SFLDMI: sorted on the... (2 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)
I want to sort unique values of column 2 that has the maximum value at column 7. this is my file and desired output
I have a file like this:
AD008 AD0081010180947 101018 0947 0950 1010180947 1010180950
AD008 AD0081010180947 101018 0947 0956 1010180947 1010180956
AD008 AD0081010180947... (12 Replies)
Hi All,
I am trying to sort the below data using sort command.
temp.dat
H|S1-511091486889|27-Jul-2011 00:00:00
H|S1-511091486823|27-Jul-2011 00:00:00
H|S1-511091486757|27-Jul-2011 00:00:00
L|S1-511091486889|1
L|S1-511091486823|1
L|S1-511091486757|1
sort -t "|" -k2 -k1 temp.dat
My... (5 Replies)
Discussion started by: deepaknbk
5 Replies
LEARN ABOUT CENTOS
project_walk
project_walk(3PROJECT)project_walk(3PROJECT)NAME
project_walk - visit active project IDs on current system
SYNOPSIS
cc [ flag ... ] file... -lproject [ library ... ]
#include <project.h>
int project_walk(int (*callback)(const projid_t project, void *walk_data), void *init_data);
The project_walk() function provides a mechanism for the application author to examine all active projects on the current system. The
callback function provided by the application is given the ID of an active project at each invocation and can use the walk_data to record
its own state. The callback function should return non-zero if it encounters an error condition or attempts to terminate the walk prema-
turely; otherwise the callback function should return 0.
Upon successful completion, project_walk() returns 0. It returns -1 if the callback function returned a non-zero value or if the walk
encountered an error, in which case errno is set to indicate the error.
The project_walk() function will fail if:
ENOMEM There is insufficient memory available to set up the initial data for the walk.
Other returned error values are presumably caused by the callback function.
Example 1: Count the number of projects available on the system.
The following example counts the number of projects available on the system.
#include <sys/types.h>
#include <project.h>
#include <stdio.h>
typedef struct wdata {
uint_t count;
} wdata_t;
wdata_t total_count;
int
simple_callback(const projid_t p, void *pvt)
{
wdata_t *w = (wdata_t *)pvt;
w->count++;
return(0);
}
...
total_count.count = 0;
errno = 0;
if ((n = project_walk(simple_callback, &total_count)) >= 0)
(void) printf("count = %u
", total_count.count);
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
getprojid(2), libproject(3LIB), settaskid(2), attributes(5)
7 Oct 2003 project_walk(3PROJECT)