10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am using RHEL 6.9. I got a requirement to group the records in a file.The file content as shown below.
#### FAILED JOBS IN XXX #####
1> ABCD failed in the project XXX
2> HJK Job is in compiled state in the project XXX
3> ILKD failed in the project XXX
4> DFG failed in the... (5 Replies)
Discussion started by: ginrkf
2. UNIX for Beginners Questions & Answers
My input looks like that:
Using awk, I am trying to get:
For records with same $1, group all the $2 in a field (without replicates), and all the $3 in a field (without replicates).
What I have tried:... (6 Replies)
Discussion started by: beca123456
3. Shell Programming and Scripting
I have below record set. File is fixed widht file
101nboston us 20150103
102boston us 20140106
102boston us 20140103
I need to group record based on first 3 letters in our case(101 and 102)
and sort last 8 digit in ascending order and print only... (4 Replies)
Discussion started by: patricjemmy6
4. UNIX for Advanced & Expert Users
I have records in a file with name,SSO,openitems,manageremail with | delimited file.Now i want to group the records by SSO and openitems and send email to their manageremail.
firstname.lastname@example.org... (2 Replies)
Discussion started by: kiranparsha
5. UNIX for Dummies Questions & Answers
Among records from same group (i.e. with same 1st and 2nd field - separated by ";"), I would need to keep the last record... (5 Replies)
Discussion started by: beca123456
6. Infrastructure Monitoring
I have a file has following records
policy glb id 1233 name Permit ping from "One" to "Second" "Address1" "Any" "ICMP-ANY" permit
policy id 999251
policy glb id 1234 name Permit telnet from "One" to "Second" "Address2" "Any" "TCP-ANY" permit
policy id 1234... (3 Replies)
Discussion started by: baskar
7. Shell Programming and Scripting
I have records like this
D457@dm.com,457,571,NORTT,25/08/2009 23:59... (4 Replies)
Discussion started by: trichyselva
8. Shell Programming and Scripting
I've a file like below:
I've another file which has
------ ------ (3 Replies)
Discussion started by: Matrix2682
9. Shell Programming and Scripting
I want to get help for below case.
I have a file like this.
so i want to get the result,
ravi 3 like this.
Pls help me. (17 Replies)
Discussion started by: Nayanajith
10. UNIX for Advanced & Expert Users
I have this file which has 3 columns, District , stores and unit. What I want is all rows belonging to one district to be created separately under each district, the districts may vary every day , the source file may have 3 districts today and may have 160 tomorrow, so what I need is a... (20 Replies)
Discussion started by: thumsup9
NEWGRP(1) BSD General Commands Manual NEWGRP(1)
newgrp -- change to a new primary group
newgrp [-l] [group]
The newgrp command changes a user to a new primary group (real and effective group ID) by starting a new shell. The user remains logged in
and the current directory and file creation mask remain unchanged. The user is always given a new shell even if the primary group change
The newgrp command accepts the following options:
-l The environment is changed to what would be expected if the user actually logged in again. This simulates a full login.
The group is a group name or non-negative numeric group ID from the group database. The real and effective group IDs are set to group or the
group ID associated with the group name.
If group is not specified, newgrp restores the user's real and effective group IDs to the user's primary group specified in the password
database. The user's supplementary group IDs are restored to the set specified for the user in the group database.
If the user is not a member of the specified group, and the group requires a password, the user will be prompted for the group password.
/etc/group The group database
/etc/master.passwd The user database
/etc/passwd A Version 7 format password file
If a new shell is started the exit status is the exit status of the shell. Otherwise the exit status will be >0.
csh(1), groups(1), login(1), sh(1), su(1), umask(2), group(5), passwd(5), environ(7)
The newgrp command conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
A newgrp command appeared in Version 6 AT&T UNIX. A newgrp command appeared in NetBSD 5.0.
There is no convenient way to enter a password into /etc/group. The use of group passwords is strongly discouraged since they are inherently
insecure. It is not possible to stop users from obtaining the encrypted password from the group database.
June 6, 2007 BSD