Sponsored Content
Top Forums UNIX for Dummies Questions & Answers locate a pattern and delete it using sed Post 302444058 by hobiwhenuknowme on Tuesday 10th of August 2010 09:32:49 PM
Old 08-10-2010
perfect. thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed delete pattern with special characters

Hi all, I have the following lines <b>A gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text) <b>B gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text) <b>J gtwrhwrthwr text hghthwrhtwrtw </b><font color='#06C'>; text text (text) and I would like to... (5 Replies)
Discussion started by: stinkefisch
5 Replies

2. HP-UX

How to delete specific pattern in a file with SED?

I have one file which is having content as following... 0513468211,,,,20091208,084005,5,,2,3699310, 0206554475,,,,20090327,123634,85,,2,15615533 0206554475,,,,20090327,134431,554,,2,7246177 0103000300,,,,20090523,115501,89,,2,3869929 0736454328,,,,20091208,084005,75,,2,3699546... (7 Replies)
Discussion started by: ganesh.mandlik
7 Replies

3. Shell Programming and Scripting

sed to find pattern and delete line before and after

I have the following file: line1 line2 MATCH line3 line4 I need to find the pattern, "MATCH" and delete the line before and after MATCH. So the result should be line1 MATCH lline4 I have to use sed because it is the only utility that is common across my environments. I... (1 Reply)
Discussion started by: craftereric
1 Replies

4. Shell Programming and Scripting

sed pattern to delete lines containing a pattern, except the first occurance

Hello sed gurus. I am using ksh on Sun and have a file created by concatenating several other files. All files contain header rows. I just need to keep the first occurrence and remove all other header rows. header for file 1111 2222 3333 header for file 1111 2222 3333 header for file... (8 Replies)
Discussion started by: gary_w
8 Replies

5. Shell Programming and Scripting

sed search pattern and delete lines

Hello, i have a question. My problem is that i have a file like: TEST JOHN ADAM MICHAEL SEBASTIAN ANDY i want find for MICHAEL and want delete lines like this: TEST (4 Replies)
Discussion started by: eightball
4 Replies

6. Shell Programming and Scripting

Delete to eol after pattern with sed

working on interactive ftp script saving log and want to remove the password from log so "quote PASS foofoo" would become "quote PASS XXXXXXX" replacing or removing the password is of no matter have tried several sed commands but have only been successful with character matching not pattern ... (2 Replies)
Discussion started by: ppaprota
2 Replies

7. Shell Programming and Scripting

Delete a pattern using sed.

I have a string in which i need to match a pattern and then i need to delete that line which contains that matching string. The string is .. This is the given string //abc/def/IC.5.4.3/test/... i need to match //abc I am writing like this sed '/^/\/\abc/d' but it is not giving me... (4 Replies)
Discussion started by: codecatcher
4 Replies

8. Shell Programming and Scripting

Use sed to delete remainder of line after pattern

Greetings, I need some assistance here as I cannot get a sed line to work properly for me. I have the following list: Camp.S01E04.720p.HDTV.X264-DIMENSION Royal.Pains.S05E07.720p.HDTV.x264-IMMERSE Whose.Line.is.it.Anyway.US.S09E05.720p.HDTV.x264-BAJSKORV What I would like to accomplish is to... (3 Replies)
Discussion started by: choard
3 Replies

9. Shell Programming and Scripting

Sed. Delete line before and after pattern.

Hi. In need to delete line before and after pattern in file. I came to following commands. Delete line before sed -ni '/pattern/{x;d;};1h;1!{x;p;};${x;p;}' /etc/testfile Delete line after sed -i '/pattern/{N;s/\n.*//;}' /etc/testfile Is it possible to merge it in single command? (3 Replies)
Discussion started by: urello
3 Replies

10. Shell Programming and Scripting

sed command to delete a pattern in a file

Hi Everyone, I have an unusual requirement. Here is where i am stuck for sometime now... I have this text file.. lets say .. output.sql... it has lot of entries... here below is part of the entry... .. . . . . . . . . . . . . . . . .... (3 Replies)
Discussion started by: vivek d r
3 Replies
delete clearinghouse(1m)												  delete clearinghouse(1m)

NAME
delete clearinghouse - Deletes the specified clearinghouse from the local server system SYNOPSIS
cdscp delete clearinghouse clearinghouse-name ARGUMENT
The full name of the clearinghouse. DESCRIPTION
The delete clearinghouse command deletes a clearinghouse from the local server system. CDS does not permit you to delete a cleared clear- inghouse. Before you can delete a cleared clearinghouse, you must recreate it using the create clearinghouse command. The delete clearinghouse command automatically deletes all read-only replicas from a clearinghouse. CDS does not permit you to delete a clearinghouse that contains a master replica. See the DCE Directory Service module of the DCE Administration Guide for more information about handling master replicas when deleting a clearinghouse. Permissions Required You must have write and delete permission to the clearinghouse and administer permission to all directories that store replicas in the clearinghouse. The server principal needs delete permission to the associated clearinghouse object entry and administer permission to all directories that store replicas in the clearinghouse. NOTES
It is recommended that you delete all replicas except the root before issuing this command. This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLE
The following command deletes a clearinghouse named /.:/sales/Orion_CH from the local server system: cdscp> delete clearinghouse /.:/sales/Orion_CH RELATED INFORMATION
Commands: clear clearinghouse(1m), create clearinghouse(1m), list clearinghouse(1m), set cdscp preferred clearinghouse(1m), show clearing- house(1m), show cdscp preferred clearinghouse(1m) Books: DCE Administration Guide delete clearinghouse(1m)
All times are GMT -4. The time now is 12:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy