g[] is a list of user names on the current line. Duplicates are eliminated by removing entries from the g[] array and, if it is changed, reconstructing the 4th field on the current line before writing the updated line. key[gid, user_name] is a two dimensional array that keeps track of what user names have been seen for the gid on the current line (ignoring the group name). Here is a copy of my original script with extensive comments added. Let me know if something still is not clear.
I have searched the forum for this - forgive me if I missed a previous post.
I have the following file:
blah blah blah
blah blah blah
blah blah blah
blah blah blah
blah blah blah
alter table "informix".esc_acct add constraint (foreign key (fi_id)
references "informix".fi ... (5 Replies)
Hi, I'm writing a ksh script and trying to use an awk / sed / or perl one-liner to remove the last 4 characters of a line in a file if it begins with a period.
Here is the contents of the file... the column in which I want to remove the last 4 characters is the last column. ($6 in awk). I've... (10 Replies)
hi..
i have a fasta file with the following format
>sequence1
CCGGTTTTCGATTTGGTTTGACT
>sequence2
AAAGTGCCGCCAGGTTTTGAGTGT
>sequence3
AGTGCCGCAGAGTTTGTAGTGT
Now, i want to read alternate line and add "GGGGGGGGGGG" to end of every sequence
Desired output:
>sequence1... (4 Replies)
OSX
I have been grinding my teeth on a portion of code. I am building a bash script that edits a html email template. In the template, I have place holders for SED (or whatever program is appropriate) to use as anchors for find and replace, with user defined corresponding html code. The HTML code... (3 Replies)
In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT SUSE
groupadd
groupadd(8) System Manager's Manual groupadd(8)NAME
groupadd - create a new group entry
SYNOPSIS
groupadd [-D binddn] [-P path] [-g gid [-o]] [-p password] [--preferred-gid gid]
[-r] [--service service] [--help] [--usage] [-v] group
DESCRIPTION
groupadd creates a new group entry using the values specified on the command line. Depending on the command line options the new entry will
be added to the system files or LDAP database.
The group name must begin with an alphabetic character and the rest of the string should be from the POSIX portable character class ([A-Za-
z_][A-Za-z0-9_-.]*).
OPTIONS -g, --gid gid
Force the new group ID to be the given number. This value must be positive and unique. The default is to use the first free ID after
the greatest used one. The range from which the group ID is chosen can be specified in /etc/login.defs.
--preferred-gid gid
Set the new group ID to the specified value if possible. If that value is already in use the first free ID will be chosen as
described above.
-o, --non-unique
Allow duplicate (non-unique) group IDs.
-p, --password password
Encrypted password as returned by crypt(3) for the new account. The default is to disable the account.
-r, --system
Create a system group. A system group is an entry with an GID between SYSTEM_GID_MIN and SYSTEM_GID_MAX as defined in
/etc/login.defs, if no GID is specified.
--service service
Add the group to a special directory. The default is files, but ldap is also valid.
-D, --binddn binddn
Use the Distinguished Name binddn to bind to the LDAP directory. The user will be prompted for a password for simple authentica-
tion.
-P, --path path
The group file is located below the specified directory path. groupadd will use this files, not /etc/group.
--help Print a list of valid options with a short description.
--usage
Print a short list of valid options.
-v, --version
Print the version number and exit.
FILES
/etc/group - group account information
SEE ALSO login.defs(5), group(5), groupdel(8), groupmod(8)AUTHOR
Thorsten Kukuk <kukuk@suse.de>
pwdutils December 2003 groupadd(8)