Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Looking for a good way to search & destroy lines Post 25421 by darthur on Tuesday 30th of July 2002 08:03:30 AM
Old 07-30-2002
SWAT is good for small changes

We use SWAT for small changes, but when we have several users or groups that we need to be able to delete multiple entries all at once whether it be 5 or 500. I figured that if I could find a way to remove single entries between the brackets I would be able to resolve the other issues.
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Good Suggestions & Cool Scripts

I think you guys should gather up all of the cool, *handy* scripts that you post on this site along with other scripts members post and place them in their own category. Perderabo's date_calc script would be an excellent submission as would the mail script that someone posted that sends... (4 Replies)
Discussion started by: google
4 Replies

2. Shell Programming and Scripting

How do I search first&second string & copy all content between them to other file?

Hi All, How do I search first string & second string and copy all content between them from one file to another file? Please help me.. Thanks In Advance. Regards, Pankaj (12 Replies)
Discussion started by: pankajp
12 Replies

3. UNIX for Dummies Questions & Answers

Search for & edit rows & columns in data file and pipe

Dear unix gurus, I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this: adam peter blah blah blah blah blah blah car 01 30 200 02 31 400 03 57 121 .. .. .. .. .. .. n y... (8 Replies)
Discussion started by: tintin72
8 Replies

4. Shell Programming and Scripting

How to recursively search and destroy tabs

Inspite of my best efforts, eclipse 3.5 seems to continue to misbehave and insert tab characters in my source code. How do I write a script execute from emacs to search all my files for tab characters and conveniently position me on the line of code that has the offending tab? Here are my... (7 Replies)
Discussion started by: siegfried
7 Replies

5. UNIX for Dummies Questions & Answers

How get only required lines & delete the rest of the lines in file

Hiiii I have a file which contains huge data as a.dat: PDE 1990 1 9 18 51 28.90 24.7500 95.2800 118.0 6.1 0.0 BURMA event name: 010990D time shift: 7.3000 half duration: 5.0000 latitude: 24.4200 longitude: 94.9500 depth: 129.6000 Mrr: ... (7 Replies)
Discussion started by: reva
7 Replies

6. Shell Programming and Scripting

search and replace, when found, delete multiple lines, add new set of lines?

hey guys, I tried searching but most 'search and replace' questions are related to one liners. Say I have a file to be replaced that has the following: $ cat testing.txt TESTING AAA BBB CCC DDD EEE FFF GGG HHH ENDTESTING This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies

7. Shell Programming and Scripting

Search and Destroy Script Direction Help

Being a beginner in scripting I am not sure the direction to take to accomplish the below task and would love suggestions. GOAL input file: domains.list Read input file, search in named.conf and find domain and delete entry for the purpose of cleanup activity. named.conf entry example zone... (8 Replies)
Discussion started by: djzah
8 Replies

8. Shell Programming and Scripting

Search pattern on logfile and search for day/dates and skip duplicate lines if any

Hi, I've written a script to search for an Oracle ORA- error on a log file, print that line and the .trc file associated with it as well as the dateline of when I assumed the error occured. In most it is the first dateline previous to the error. Unfortunately, this is not a fool proof script.... (2 Replies)
Discussion started by: newbie_01
2 Replies

9. UNIX for Beginners Questions & Answers

How to search & delete inclusively between two lines?

Hi all, I was wondering if anyone would know how to search & delete inclusively between two lines, please: Important: There are multiple }; lines. I'm curious how to delete the correct one only. Line numbers may vary each time this script is run. For example, I'd like to delete only the... (6 Replies)
Discussion started by: chatguy
6 Replies
PTS_DELETE(1)						       AFS Command Reference						     PTS_DELETE(1)

NAME
pts_delete - Deletes a Protection Database entry SYNOPSIS
pts delete -nameorid <user or group name or id>+ [-cell <cell name>] [-noauth] [-localauth] [-force] [-help] pts d -na <user or group name or id>+ [-c <cell name>] [-no] [-l] [-f] [-h] DESCRIPTION
The pts delete command removes each entry specified by the -nameorid argument from the Protection Database. Deleting entries affects other parts of the system in various ways: o Deleted users and groups still appear on access control lists (ACLs), but are listed by AFS UID or GID rather than by name, because there is no longer an associated name to which to translate the ID. To remove these obsolete entries from ACLs, use the fs cleanacl command. o Deleting a user or machine's entry removes it from the membership list of any group to which it belonged. o Deleting a group entry removes it from the membership list of any user or machine entry that belonged to the group, and also increments the group-creation quota of the group's creator by one, even if the creator no longer owns the group. To remove a user or machine from a group without actually deleting the entry, use the pts removeuser command. OPTIONS
-nameorid <user or group name or ID>+ Specifies the name or AFS UID of each user, the name or AFS GID of each group, or the IP address (complete or wildcard-style) or AFS UID of each machine entry to delete. 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. -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 deletes the user entries "pat" and "terry": % pts delete pat terry The following example deletes the Protection Database entry of the group with AFS GID -215. % pts delete -215 PRIVILEGE REQUIRED
The issuer must belong to the system:administrators group to delete user and machine entries. To delete group entries, the issuer must either own the group or belong to the system:administrators group. SEE ALSO
fs_cleanacl(1), pts(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_DELETE(1)
All times are GMT -4. The time now is 11:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy