Before you can sort it, you must first break them into separate groups.
---------- Post updated at 01:57 PM ---------- Previous update was at 01:46 PM ----------
This is a bit of a kludge since the sort command doesn't seem to be able to sort based on anything but fixed column positions, and your first column is variable size. If we swap the data around, it can always sort based on the first four columns.
Is there any way using the sort command to get something like a GROUP BY clause?
I'm trying to sort through race_event records and group them by those individuals that raced together in the same race on the same date at the same track, but i run into a problem when there were days when the track... (6 Replies)
Hi,
Need awk help to group and print lines to format the output as shown below
INPUT FORMAT
set echo on
set heading on
set spool on
/* SCHEMA1 */ CREATE TABLE T1;
/* SCHEMA1 */ CREATE TABLE T2;
/* SCHEMA1 */ CREATE TABLE T3;
/* SCHEMA1 */ CREATE TABLE T4;
/* SCHEMA1 */ CREATE TABLE T5;... (5 Replies)
I wrote script in bash which generates this report:
User1,admin,rep,User2,shell,path1,x1,r1
User2,admin,rep,User7,shell,path1,x1,r1
User3,admin,rep,User4,shell,path1,x1,r1
User4,admin,rep,User3,shell,path1,x1,r1
User5,admin,rep,User1,shell,path1,x1,r1
User6,admin,rep,User5,shell,path1,x1,r1... (6 Replies)
Hi @ all
I'm trying to achive to this problem,
I've a 2-column composed file as the following:
192.168.1.2 2
192.168.1.3 12
192.168.1.2 4
192.168.1.4 3
cpc1-swan1-2-3-cust123.swan.cable.ntl.com 4
192.168.1.3 5
192.168.1.2 10
192.168.1.4 8... (8 Replies)
Hi All
I do have a file like this with 6 columns. Groups of data merge together and the group number is indicated above each group.
1
1 12 26 289 3.2e-027 GCGTATGGCGGC
2 12 26 215 6.7e+006 TTCCACCTTTTG
3 9 26 175 ... (1 Reply)
Hello,
I have a file and i want to sort by third column and extract the three top lines of each group, it is determined by the second column (144, 89, 55, etc).
Could you please help me with the appropiate awk shell script
XLY-XLP 144 0.592772 XLY-XLE 144 0.798121 ... (3 Replies)
hi,
I want to create a volume group of 200 GB and then create different file systems on that.
please help me out. Its becomes confusing when the PP calculating PP.
I don't understand this concept. (2 Replies)
I'm trying to return only one row with the highest value for PCT_MAX_USED. Any suggestions?
When I add this code, I get the ORA-00937 error.
trunc(max(decode( kbytes_max, 0, 0, (kbytes_alloc/kbytes_max)*100))) pct_max_used
This is the original and returns all rows.
select (select... (3 Replies)
Discussion started by: progkcp
3 Replies
LEARN ABOUT LINUX
pg2
pg2(3erl) Erlang Module Definition pg2(3erl)NAME
pg2 - Distributed Named Process Groups
DESCRIPTION
This module implements process groups. The groups in this module differ from the groups in the module pg in several ways. In pg , each mes-
sage is sent to all members in the group. In this module, each message may be sent to one, some, or all members.
A group of processes can be accessed by a common name. For example, if there is a group named foobar , there can be a set of processes
(which can be located on different nodes) which are all members of the group foobar . There are no special functions for sending a message
to the group. Instead, client functions should be written with the functions get_members/1 and get_local_members/1 to find out which pro-
cesses are members of the group. Then the message can be sent to one or more members of the group.
If a member terminates, it is automatically removed from the group.
Warning:
This module is used by the disk_log module for managing distributed disk logs. The disk log names are used as group names, which means that
some action may need to be taken to avoid name clashes.
EXPORTS
create(Name) -> void()
Types Name = term()
Creates a new, empty process group. The group is globally visible on all nodes. If the group exists, nothing happens.
delete(Name) -> void()
Types Name = term()
Deletes a process group.
get_closest_pid(Name) -> Pid | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_process, Name} | {no_such_group, Name}
This is a useful dispatch function which can be used from client functions. It returns a process on the local node, if such a
process exist. Otherwise, it chooses one randomly.
get_members(Name) -> [Pid] | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_such_group, Name}
Returns all processes in the group Name . This function should be used from within a client function that accesses the group. It is
therefore optimized for speed.
get_local_members(Name) -> [Pid] | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_such_group, Name}
Returns all processes running on the local node in the group Name . This function should to be used from within a client function
that accesses the group. It is therefore optimized for speed.
join(Name, Pid) -> ok | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_such_group, Name}
Joins the process Pid to the group Name . A process can join a group several times; it must then leave the group the same number of
times.
leave(Name, Pid) -> ok | {error, Reason}
Types Name = term()
Pid = pid()
Reason = {no_such_group, Name}
Makes the process Pid leave the group Name . If the process is not a member of the group, ok is returned.
which_groups() -> [Name]
Types Name = term()
Returns a list of all known groups.
start()
start_link() -> {ok, Pid} | {error, Reason}
Types Pid = pid()
Reason = term()
Starts the pg2 server. Normally, the server does not need to be started explicitly, as it is started dynamically if it is needed.
This is useful during development, but in a target system the server should be started explicitly. Use configuration parameters for
kernel for this.
SEE ALSO kernel(7) , pg(3erl)Ericsson AB kernel 2.14.3 pg2(3erl)