Still not sure after reading the positings, if I need to append a line after a particular line, then how to do it?
For example -
Code:
My out-put is like this
$ p4 group -o lpth-everyone
# A Perforce Group Specification.
#
# Group: The name of the group.
# MaxResults: A limit on the results of operations for users in
# this group, or 'unlimited'. See 'p4 help maxresults'.
# MaxScanRows: A limit on the data scanned during operations for users
# in this group, or 'unlimited'. See 'p4 help maxresults'.
# Timeout: A time (in seconds) which determines how long a 'p4 login'
# session ticket remains valid (default is 12 hours).
# Subgroups: Other groups automatically included in this group.
# Users: The users in the group. One per line.
Group: lpth-everyone
MaxResults: unlimited
MaxScanRows: unlimited
Timeout: 43200
Subgroups:
Users:
aparna
hiqbal
kamalesh
nverma
rchitu
rmookherjee
rsarmiento
Now for example if I need to add "xxxxx" just below "nverma" then how to do it? Which means the output should be like this
Code:
My out-put required to be like this
$ p4 group -o lpth-everyone | <some unix stream appending operation>
# A Perforce Group Specification.
#
# Group: The name of the group.
# MaxResults: A limit on the results of operations for users in
# this group, or 'unlimited'. See 'p4 help maxresults'.
# MaxScanRows: A limit on the data scanned during operations for users
# in this group, or 'unlimited'. See 'p4 help maxresults'.
# Timeout: A time (in seconds) which determines how long a 'p4 login'
# session ticket remains valid (default is 12 hours).
# Subgroups: Other groups automatically included in this group.
# Users: The users in the group. One per line.
Group: lpth-everyone
MaxResults: unlimited
MaxScanRows: unlimited
Timeout: 43200
Subgroups:
Users:
aparna
hiqbal
kamalesh
nverma
xxxxx
rchitu
rmookherjee
rsarmiento
NOTE: I need to maintain the space before "xxxxx" as well.
Hi,
I have a file which contains many occurances of a string say "hellosunil".
I want to insert a newline charcater after all the "hellosunil" strings in the file.
trying to use sed,
sed -e 's/hellosunil/\\nhellosunil/g' file1
sed help says u cannot substitute a regular expression... (6 Replies)
Dear all,
I have a file created in the name sample.txt in UNIX with header and footer. How to insert a required string (for example "FILE1") in the header part after the file has been created. What kind of command can i use to do the same.
Thanks in advance
Hari (3 Replies)
i have a file contains like this:
i want to create a script that will insert a comma "." after the 10th character so it would be look like this
thanks in advance (5 Replies)
Hello
Can somebody please help me with the following script?
I'm trying to create a text file with 20 blank lines and then insert a string in line 2 but nothing is printed in the itxtfile. I can create the file with 20 blank lines but when I "tell" it to print something on the second line, it... (4 Replies)
Hello Mates,
I have one txt file having commo seperated values. I have to insert string "FALSE" in 2nd field from the end. E.G
SE18 6RN,,,,5439070,1786840,,1000002148671600,123434
Out put should be:
SE18 6RN,,,,5439070,1786840,FALSE,1000002148671600,123434
Can some one help me to... (8 Replies)
Hi,
I have a very long pipe delimited string. The length of the string could vary. For example:
START|one|two|three|four|five|six|seven
START|one|two|three|four|five|six|seven|eight|nine
START|one|two|three|four
I want to replace in the third occurence of string with another... (9 Replies)
Hi everyone,
I am trying to insert a single very long string as the first line of a file,
So the following sed commands does what I want;
sed '1i\"","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"' file.txt
Think that all the... (3 Replies)
I am getting some values from a file and putting them in an array..but the null strings are not getting passed to the array. So during printing the elements ,the null string is not showing in the output. during array size calculation it is also excluding null.Please let me know how to do it.
# cat... (2 Replies)
Discussion started by: millan
2 Replies
LEARN ABOUT CENTOS
gshadow
GSHADOW(5) File Formats and Conversions GSHADOW(5)NAME
gshadow - shadowed group file
DESCRIPTION
/etc/gshadow contains the shadowed information for group accounts.
This file must not be readable by regular users if password security is to be maintained.
Each line of this file contains the following colon-separated fields:
group name
It must be a valid group name, which exist on the system.
encrypted password
Refer to crypt(3) for details on how this string is interpreted.
If the password field contains some string that is not a valid result of crypt(3), for instance ! or *, users will not be able to use a
unix password to access the group (but group members do not need the password).
The password is used when an user who is not a member of the group wants to gain the permissions of this group (see newgrp(1)).
This field may be empty, in which case only the group members can gain the group permissions.
A password field which starts with a exclamation mark means that the password is locked. The remaining characters on the line represent
the password field before the password was locked.
This password supersedes any password specified in /etc/group.
administrators
It must be a comma-separated list of user names.
Administrators can change the password or the members of the group.
Administrators also have the same permissions as the members (see below).
members
It must be a comma-separated list of user names.
Members can access the group without being prompted for a password.
You should use the same list of users as in /etc/group.
FILES
/etc/group
Group account information.
/etc/gshadow
Secure group account information.
SEE ALSO gpasswd(5), group(5), grpck(8), grpconv(8), newgrp(1).
shadow-utils 4.1.5.1 05/25/2012 GSHADOW(5)