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 HPUX
newgrp
newgrp(1) General Commands Manual newgrp(1)NAME
newgrp - switch to a new group
SYNOPSIS
[group]
DESCRIPTION
The command changes your group ID without changing your user ID and replaces your current shell with a new one.
If you specify group, the change is successful if group exists and either your user ID is a member of the new group, or group has a pass-
word and you can supply it from the terminal.
If you omit group, changes to the group specified in your entry in the password file,
Whether the group is changed successfully or not, or the new group is the same as the old one or not, proceeds to replace your current
shell with the one specified in the shell field of your password file entry. If that field is empty, uses the POSIX shell, (see sh-
posix(1)).
If you specify (hyphen) as the first argument, the new shell starts up as if you had just logged in. If you omit the new shell starts up
as if you had invoked it as a subshell.
You remain logged in and the current directory is unchanged, but calculations of access permissions to files are performed with respect to
the new real and effective group IDs.
Exported variables retain their values and are passed to the new shell. All unexported variables are deleted, but the new shell may reset
them to default values.
Since the current process is replaced when the new shell is started, exiting from the new shell has the same effect as exiting from the
shell in which was executed.
EXTERNAL INFLUENCES
International Code Set Support
Characters from the 7-bit USASCII code set are supported in group names (see ascii(5)).
DIAGNOSTICS
The command issues the following error messages:
Your user ID does not qualify as a group member.
The group name does not exist in
If a password is required, it must come from a terminal.
Standard input is not a terminal file,
causing the new shell to fail.
EXAMPLES
To change from your current group to group without executing the login routines:
To change from your current group to group and execute the login routines:
WARNINGS
There is no convenient way to enter a password into
The use of group passwords is not recommended because, by their very nature, they encourage poor security practices. Group passwords may
be eliminated in future HP-UX releases.
If the specified group to has multiple inconsistent entries (i.e. the group id or/and password are different) in the group database, will
consider the group id and password of the first matched group entry as the correct group id and password for the group.
FILES
System group file
System password file
SEE ALSO csh(1), ksh(1), login(1), sh-posix(1), group(4), passwd(4), environ(5).
STANDARDS CONFORMANCE newgrp(1)