The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How is use sselect statement o/p in insert statement. nkosaraju Shell Programming and Scripting 2 08-06-2008 10:26 PM
If statement - How to write a null statement april Shell Programming and Scripting 3 04-16-2008 02:14 PM
using && in if statement .. jisha Shell Programming and Scripting 7 02-01-2008 07:52 AM
IF statement omran Shell Programming and Scripting 6 04-21-2003 06:00 AM
smitty, remove user, remove directory as well.. yls177 UNIX for Dummies Questions & Answers 2 11-11-2002 02:43 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-24-2008
Guyverix Guyverix is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 4
sed remove statement

I am having some problems with sed, that I am hoping that I can get some assistance with. I am trying to remove two subsets of a string, and cannot figure out how to have it work.

Here is an example string:

[Wed Sep 24 08:47:46 2008] [warn] [client xxx.xxx.xxx.xxx] [28580] auth_ldap authenticate: user joe authentication failed; URI /svn/ [User not found][No such object]

I want to use sed to remove [Wed Sep 24 08:47:46 2008] [warn] including the [ and ]. I only want the first two of these removed.

Suggestions or pointers on doing something like this?

I cannot do this in the apache conf file, as this sed statement is actually so that I can send SNMP trap data, I do not want to change what is going into the log files.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:33 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0