12-22-2012
Build a table from a list by comparing existing table entries
I am new to this shell scripting....
I have a file which contains list of users. This files get updated when new user comes into the system.
I want to create script which will give a table containing unique list of users. When I say unique, it means script should match table while parsing user file list.
E.g.
List-----
User1
User2
User1
User3
User4
User1
The script output should be a list with
User1
User2
User3
User4
Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to calculate the number of pipe delimiters in a file for all lines seperately.
For eg:i have a file Project.txt
Mohit|chawla|123|678
File1|File2|345|767|678
And my file contains many lines like this
it shd give me the output as
4
5
or give me the output for all the... (0 Replies)
Discussion started by: Mohit623
0 Replies
2. Solaris
Hi,
I have two text files.The first and the 2nd file have data in the same format
For e.g. The first file has
BOOKS COUNT: 40
BOOKS AUTHOR1 SUM:1018 MAX:47 MIN:1 AVG:25.45
BOOKS AUTHOR3 SUM:181 MAX:48 MIN:3 AVG:18.1
Note:Read it as Table columnname sum(column) max(column) min(column)... (1 Reply)
Discussion started by: ragavhere
1 Replies
3. Shell Programming and Scripting
I have requirement:
1) Check the record count in table (table in oracle)
2) If records exists generate the file for existing records and wait for some time (Go to sleep mode) and
Again check the record count after 10 min.......... (Loop this process if record count >0).
3) Generate touch... (1 Reply)
Discussion started by: kamineni
1 Replies
4. Shell Programming and Scripting
I have requirement:
1) Check the record count in table (table in oracle)
2) If records exists generate the file for existing records and wait for some time then Go to sleep mode and
Again check the record count after 10 min.......... (Loop this process if record count >0).
3) Generate touch... (1 Reply)
Discussion started by: kamineni
1 Replies
5. Shell Programming and Scripting
Hi
I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.)
I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
Discussion started by: aemunathan
2 Replies
6. UNIX and Linux Applications
hi there, I am trying to create a stored procedure that i can pass the table name to and it will create a table with that name. but for some reason it creates with what i have defined as the variable name . In the case of the example below it creates a table called 'tname'
for example
... (6 Replies)
Discussion started by: rethink
6 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I'm working with putty on Windows 7 professional and I'd like to know if there's a way to gather specific lines from a pre-existing table and make a new table with that information.
More specifically, I'd like the program to look at a specific column, say column N, and see if any of the... (5 Replies)
Discussion started by: Deedee393
5 Replies
8. UNIX and Linux Applications
hi,
i need to copy one table with data into another table,
right now am using
create table table1 as select * from table2
i want the constraints of table1 to be copied to table2 also , can anyone give me some solution to copy the constraints also, now am using oracle 10.2.0.3.0... (1 Reply)
Discussion started by: senkerth
1 Replies
9. Shell Programming and Scripting
Hello,
I need some help to reformat this table-by-row to matrix?
infile:
site1 A:o,p,q,r,s,t
site1 C:y,u
site1 T:v,w
site1 -:x,z
site2 A:p,r,t,v,w,z
site2 C:u,y
site2 G:q,s
site2 -:o,x
site3 A:o,q,s,t,u,z
site3 C:y
site3 T:v,w,x
site3 -:p,routfile:
SITE o p q r s t v u w x y... (7 Replies)
Discussion started by: yifangt
7 Replies
10. Web Development
Bootstrap is great; but we have had some issues with Bootstrapped <tables> (and legacy <fieldset> elements) showing annoying, wayward lines. I solved that problem today with this simple jQuery in the footer:
<script>
$(function(){
$('tr, td, fieldset,... (0 Replies)
Discussion started by: Neo
0 Replies
LEARN ABOUT SUNOS
gsscred
gsscred(1M) System Administration Commands gsscred(1M)
NAME
gsscred - add, remove and list gsscred table entries
SYNOPSIS
gsscred [ -n user [-o oid] [-u uid]] [-c comment] -m mech -a
gsscred [ -n user [-o oid]] [-u uid] [-m mech] -r
gsscred [ -n user [-o oid]] [-u uid] [-m mech] -l
DESCRIPTION
The gsscred utility is used to create and maintain a mapping between a security principal name and a local UNIX uid. The format of the user
name is assumed to be GSS_C_NT_USER_NAME. You can use the -o option to specify the object identifier of the name type. The OID must be
specified in dot-separated notation, for example: 1.2.3.45464.3.1
The gsscred table is used on server machines to lookup the uid of incoming clients connected using RPCSEC_GSS.
When adding users, if no user name is specified, an entry is created in the table for each user from the passwd table. If no comment is
specified, the gsscred utility inserts a comment that specifies the user name as an ASCII string and the GSS-APIsecurity mechanism that
applies to it. The security mechanism will be in string representation as defined in the /etc/gss/mech file.
The parameters are interpreted the same way by the gsscred utility to delete users as they are to create users. At least one of the follow-
ing options must be specified: -n, -u, or -m. If no security mechanism is specified, then all entries will be deleted for the user identi-
fied by either the uid or user name. If only the security mechanism is specified, then all user entries for that security mechanism will be
deleted.
Again, the parameters are interpreted the same way by the gsscred utility to search for users as they are to create users. If no options
are specified, then the entire table is returned. If the user name or uid is specified, then all entries for that user are returned. If a
security mechanism is specified, then all user entries for that security mechanism are returned.
OPTIONS
-a Add a table entry.
-c comment Insert comment about this table entry.
-l Search table for entry.
-m mech Specify the mechanism for which this name is to be translated.
-n user Specify the optional principal name.
-o oid Specify the OID indicating the name type of the user.
-r Remove the entry from the table.
-u uid Specify the uid for the user if the user is not local.
EXAMPLES
Example 1: Creating a gsscred Table for the Kerberos v5 Security Mechanism
The following shows how to create a gsscred table for the kerberos v5 security mechanism. gsscred obtains user names and uid's from the
passwd table to populate the table.
example% gsscred -m kerberos_v5 -a
Example 2: Adding an Entry for root/host1 for the Kerberos v5 Security Mechanism
The following shows how to add an entry for root/host1 with a specified uid of 0 for the kerberos v5 security mechanism.
example% gsscred -m kerberos_v5 -n root/host1 -u 0 -a
Example 3: Listing All User Mappings for the Kerberos v5 Security Mechanism
The following lists all user mappings for the kerberos v5 security mechanism.
example% gsscred -m kerberos_v5 -l
Example 4: Listing All Mappings for All Security Mechanism for a Specified User
The following lists all mappings for all security mechanisms for the user bsimpson.
example% gsscred -n bsimpson -l
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgss |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
SEE ALSO
gssd(1m), See gsscred.conf(4), attributes(5)
NOTES
Some GSS mechanisms, such as kerberos_v5, provide their own authenticated-name-to-local-name (uid) mapping and thus do not usually have to
be mapped using gsscred. See gsscred.conf(4) for more information.
SunOS 5.10 11 Feb 2004 gsscred(1M)