04-20-2012
Hi calredd,
It can be an easy task or a bit more difficult. Can you identify each group? I mean, does the group always begins in DC or can vary?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Many of my servers' /etc/group file have many userid's that does not exist in /etc/passwd file and they need to be deleted.
This happened due to manual manipulation of /etc/passwd files.
I need to do this for 40 servers.
Can anyone help me in achieving this? Even reducing a step or two will be... (6 Replies)
Discussion started by: pdtak
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Could anyone help me in changing a tabular format output to comma seperated file pls in K-sh. Its very urgent.
E.g : username empid
------------------------
sri 123
to
username,empid
sri,123
Thanks,
Hema:confused: (2 Replies)
Discussion started by: Hemamalini
2 Replies
3. Shell Programming and Scripting
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)
Discussion started by: rajan_san
5 Replies
4. Shell Programming and Scripting
Hi.
I am reasonably new to awk, but have done quite a lot of unix scripting in the past. I have resolved the issues below with unix scripting but it runs like a dog. Moved to awk for speed and functionality but running up a big learning curve in a hurry, so hope there is some help here.
I... (6 Replies)
Discussion started by: mike.strategis
6 Replies
5. Shell Programming and Scripting
Hi,
I've the following two CSV files:
File1.csv File2.csv
Class,Student# Student#,Marks
1001,6001 6002,50
1001,6002 6001,60
1002,7000 ... (3 Replies)
Discussion started by: Matrix2682
3 Replies
6. Shell Programming and Scripting
Hi,
Suppose I have a csv file, each line look like this:
ABC Company, 1999, March, caucasian owned, 123 BroadWay NY 92939-2222
How do I create two new columns at the end, one for state, one for zip.
So that the line is
ABC Company, 1999, March, caucasian owned, 123 BroadWay NY... (2 Replies)
Discussion started by: grossgermany
2 Replies
7. UNIX Desktop Questions & Answers
This really is a dummy question but I'm stuck and out of time... I have a large file and out of it I only want to pick out lines starting with either "Pressure" or "N". I still need these lines to be in their original order.
example of text
Pressure 3
N 2
N 3
bla bla
bla bla
Pressure 4... (3 Replies)
Discussion started by: jenjen_mt
3 Replies
8. Shell Programming and Scripting
Hi Folks!
I have a file like this
000000006 dist:0.0 FILE ./MintRoute/MultiHopWMEWMA.nc LINE:305:1 NODE_KIND:131 nVARs:4 NUM_NODE:66 TBID:733 TEID:758
000000000 dist:0.0 FILE ./Route/MultiHopLEPSM.nc LINE:266:1 NODE_KIND:131 nVARs:4 NUM_NODE:66 TBID:601 TEID:626
000000001 ... (2 Replies)
Discussion started by: jackoverflow
2 Replies
9. Shell Programming and Scripting
Source 1
column1 column2 column 3 column4
1,ganesh,1,000,1
222,ram,2,000,5
222,ram,50,000,5
33,raju,5,000,7
33,raju,5,000,7
33,raju,5,000,8
33,raju,5,000,4
33,raju,5,000,1
In my .csv file, third column is having price value with comma (20,300), it has to be considered 1,000 as... (1 Reply)
Discussion started by: Ganesh L
1 Replies
10. Shell Programming and Scripting
Input data
COL_1,COL_2,COL_3,COL_4,COL_5,COL_6,COL_7,COL_8,COL_9,COL_10,COL_11,COL_12,COL_13
C,ABC,ABCD,3,ZZ,WLOA,2015-12-01,2016-12-01,975.73,ZZZ,P,111111.00,Y1 **GROUP1**
C,ABC,ABCD,3,ZZ,WLOA,2015-12-01,2016-12-01,975.73,ZZZ,P,222222.00,Y1 **GROUP1**... (2 Replies)
Discussion started by: Ads89
2 Replies
newgrp(1) General Commands Manual newgrp(1)
NAME
newgrp - change effective group ID sg - execute command with different group ID
SYNOPSIS
newgrp [-l] [group]
sg group -c command
DESCRIPTION
The newgrp command changes the user's real and effetive group ID by replacing the current shell with a new shell. A new shell is launched
even if an error occours.
A password is requested if the group has a password and the user is not listed in the group file as being a member of that group. The pass-
word can be changed with the gpasswd(1) command.
If the new effective group ID is not in the supplementary group list, newgrp will add the new group ID to the supplementary list, too.
With no operands and options, newgrp changes the user's group IDs (real and effective) back to the group specified in password and group
file.
The sg command works like the newgrp command, except that it executes the given command with /bin/sh and upon exit the group ID of the cur-
rent shell is not changed.
OPTIONS
-l, --login
reinitialize the environment as if the user logged in.
--help Print a help list.
-u, --usage
Print a short usage message.
-v, --version
Print program version.
SEE ALSO
gpasswd(1), group(5), passwd(1), passwd(5), su(1)
AUTHOR
Thorsten Kukuk <kukuk@suse.de>
pwdutils April 2004 newgrp(1)