Hi folks,
- I have 800 txt files
- those files are cisco router configs
router1.txt
router2.txt
...
router800.txt
I want to accomplish the following:
- I want to have a seperate file with all the filenames that I want to process
- I want a script that goes trough all those... (7 Replies)
A newbie to shell scripting.....
I need some assistance in doing the following:
I have a system generated text file(a makefile basically).
Before I can execute the make command, I need to modify one section of this generated file.
The generated section is as follows:
# INCLUDE macro... (5 Replies)
In other news, I have a colors text file with hundreds of lines, and I want to print only the even numbered lines. for example I have this file looks something like this:
ALLCOLORS.TXT
red red green red
blue red red red
green red red blue
green green green
blue blue blue
red blue blue blue... (1 Reply)
Hi there,
I have a comma seperated file which looks like
16-Jun-08,KLM forwarder,,AMS,DXB,AMS,C,Y,G10,074-02580900,milestone failed - message not received,C,OK,,13/06/2008 00:00,KL427,13/06/2008 00:00,KL427,Rebooked,C,milestone failed - message not received,milestone failed - evented... (3 Replies)
I have one base file, and multiple target files-- each have uniform line structure so no need to use grep to find things-- can just define sections by line number.
My question is quite simple-- can I use sed to copy a defined block of lines (say lines 5-10) from filename1.txt to overwrite an... (3 Replies)
Hi everyone,
I have two files (A and B) and want to combine them to one by always taking 10 rows from file A and subsequently 6 lines from file B. This process shall be repeated 40 times (file A = 400 lines; file B = 240 lines).
Does anybody have an idea how to do that using perl, awk or sed?... (6 Replies)
I have a diff command that does what I want but when comparing large text/log files, it uses up all the memory I have (sometimes over 8gig of memory)
diff file1.txt file2.txt | grep '^<'| awk '{$1="";print $0}' | sed 's/^ *//'
Is there a better more efficient way to find the lines in one file... (5 Replies)
Hi
I have a file with contents:
NAMES
John
carrey
williams
How can I get all the names and store them in seperate variables(or arrays)
please keep in mind that the no. of such names is not known.Three here is a bogus value
~thanks (4 Replies)
Hello again gentlemen.
I would like to make a shell script to 'optimize' a plain text full of IPs.
Let's suppose to have this text file:
1.192.63.253-1.192.63.253
1.0.234.46/32
1.1.128.0/17
1.116.0.0/14
1.177.1.157-1.177.1.157
1.23.22.19
1.192.61.0-1.192.61.99
8.6.6.6
I want to... (2 Replies)
hi~
i need script on AIX. and have a text file following :
create aa
1
2
3
from a@a;
create bb
from b;
create cc
3
4
5
6
6
7
from c@c; (7 Replies)
Discussion started by: tomato00
7 Replies
LEARN ABOUT V7
pts_setfields
PTS_SETFIELDS(1) AFS Command Reference PTS_SETFIELDS(1)NAME
pts_setfields - Sets privacy flags or quota for a Protection Database entry
SYNOPSIS
pts setfields -nameorid <user or group name or id>+
[-access <set privacy flags>]
[-groupquota <set limit on group creation>]
[-cell <cell name>] [-noauth] [-localauth]
[-force] [-help]
pts setf -na <user or group name or id>+
[-a <set privacy flags>]
[-g <set limit on group creation>] [-c <cell name>]
[-no] [-l] [-f] [-h]
DESCRIPTION
The pts setfields command sets the group-creation quota, the privacy flags, or both, associated with each user, machine, or group entry
specified by the -nameorid argument.
To examine the current quota and privacy flags, use the pts examine command.
CAUTIONS
Changing a machine or group's group-creation quota is allowed, but not recommended. The concept is meaningless for machines and groups,
because it is impossible to authenticate as a group or machine.
Similarly, some privacy flag settings do not have a sensible interpretation. OPTIONS specifies the appropriate settings.
OPTIONS -nameorid <user or group name or id>+
Specifies the name or AFS UID of each user, the IP address (complete or wildcard-style) of each machine, or the name or AFS GID of each
machine for which to set privacy flags or group-creation quota. It is acceptable to mix users, machines, and groups on the same command
line, as well as names (IP addresses for machines) and IDs. Precede the GID of each group with a hyphen to indicate that it is
negative.
-access <privacy flags>
Specifies the privacy flags to apply to each entry. Provide a string of five characters, one for each of the permissions. If this
option is omitted, the current setting remains unchanged.
Set each flag to achieve the desired combination of permissions. If the following list does not mention a certain setting, it is not
acceptable. For further discussion of the privacy flags, see pts_examine(1).
o The first flag determines who can use the pts examine command to display information from a user, machine or group's Protection
Database entry.
o Set it to lowercase "s" to permit the members of the system:administrators group to display a user, machine, or group entry,
the associated user to display a user entry, and the owner or members of a group to display the group entry.
o Set it to uppercase "S" to permit anyone who can access the cell's database server machines to display a user, machine, or
group entry.
o The second flag determines who can use the pts listowned command to list the groups that a user or group owns.
o Set it to the hyphen ("-") to permit the members of the system:administrators group and a user to list the groups he or she
owns, or to permit the members of the system:administrators group and a group's owner to list the groups that a group owns.
o Set it to uppercase letter "O" to permit anyone who can access the cell's database server machines to list the groups owned by
a machine or group entry.
o The third flag determines who can use the pts membership command to list the groups to which a user or machine belongs, or the
users and machines that belong to a group.
o Set it to the hyphen ("-") to permit the members of the system:administrators group and a user to list the groups he or she
belongs to, to permit the members of the system:administrators group to list the groups a machine belongs to, or to permit the
members of the system:administrators group and a group's owner to list the users and machines that belong to it.
o Set it to lowercase "m" to permit members of a group to list the other members. (For user and machine entries, this setting is
equivalent to the hyphen.)
o Set it to uppercase "M" to permit anyone who can access the cell's database server machines to list membership information for
a user, machine or group.
o The fourth flag determines who can use the pts adduser command to add users and machines as members of a group. This flag has no
sensible interpretation for user and machine entries, but must be set nonetheless, preferably to the hyphen.
o Set it to the hyphen ("-") to permit the members of the system:administrators group and the owner of the group to add members.
o Set it to lowercase "a" to permit members of a group to add other members.
o Set it to uppercase "A" to permit anyone who can access the cell's database server machines to add members to a group.
o The fifth flag determines who can use the pts removeuser command to remove users and machines from membership in a group. This flag
has no sensible interpretation for user and machine entries, but must be set nonetheless, preferably to the hyphen.
o Set it to the hyphen ("-") to permit the members of the system:administrators group and the owner of the group to remove
members.
o Set it to lowercase "r" to permit members of a group to remove other members.
-groupquota <group creation quota>
Specifies the number of additional groups a user can create (it does not matter how many he or she has created already). Do not include
this argument for a group or machine entry.
-cell <cell name>
Names the cell in which to run the command. For more details, see pts(1).
-force
Enables the command to continue executing as far as possible when errors or other problems occur, rather than halting execution at the
first error.
-help
Prints the online help for this command. All other valid options are ignored.
-localauth
Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. Do not combine this flag with the -cell or
-noauth options. For more details, see pts(1).
-noauth
Assigns the unprivileged identity anonymous to the issuer. For more details, see pts(1).
EXAMPLES
The following example changes the privacy flags on the group "operators", retaining the default values of the first, second and third
flags, but setting the fourth and fifth flags to enable the group's members to add and remove other members.
% pts setfields -nameorid operators -access S-Mar
The following example changes the privacy flags and sets group quota on the user entry "admin". It retains the default values of the first,
fourth, and fifth flags, but sets the second and third flags, to enable anyone to list the groups that "admin" owns and belongs to. Users
authenticated as "admin" can create an additional 50 groups.
% pts setfields -nameorid admin -access SOM-- -groupquota 50
PRIVILEGE REQUIRED
To edit group entries or set the privacy flags on any type of entry, the issuer must own the entry or belong to the system:administrators
group. To set group-creation quota on a user entry, the issuer must belong to the system:administrators group.
SEE ALSO pts(1), pts_adduser(1), pts_examine(1), pts_listowned(1), pts_membership(1), pts_removeuser(1)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2014-04-08 PTS_SETFIELDS(1)