Sponsored Content
Full Discussion: deleting lines in a log file
Top Forums Shell Programming and Scripting deleting lines in a log file Post 302507566 by matze on Thursday 24th of March 2011 08:05:59 AM
Old 03-24-2011
Data deleting lines in a log file

Hello Community,

sorry iam from germany and my englisch is not so well.
iam searching for less then 4 hours on the web for a solution of my problem.
i have a proxy-log-file and want to delete lines wicht matches on two words.
example of the line in the logfile:

Quote:
1300576811.084 95 10.38.22.131 TCP_MISS/200 46730 GET ** http: // nachrichten.t-online.de/b/40/19/8 8/02/id_40198802/tid_da/index. jpg **
- DIRECT/217.6.164.165 image/jpeg
now i want to delet lines, that matches to the ip.address 10.38.22.131 and an defined url for example nachrichten.t-online.de

i tried to do this with following command:

Code:
 
sed -e "/10.38.22.131 /,/nachrichten.t-online.de/d" access_backup.log > access_backup2.log

my problem now, that all lines which includes the ip-address will be deleted and not online these how include nachrichten.t-online.d e.


i hope you can help me.

thx a lot
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

deleting lines in a log file

Is there an easy way to delete the first so many lines in a log file? like I have a log file that has 10000 lines, i want to just get rid of the first 9000. (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

2. Shell Programming and Scripting

Deleting last 2 lines from the file.

Hi I have a file & always I need to remove or delete last 2 lines from that file. So in a file if I have 10 lines then it should return me first 8 lines. Can someone help me? (4 Replies)
Discussion started by: videsh77
4 Replies

3. Shell Programming and Scripting

Deleting lines in a file

How do I delete all the lines after the line containing text ***DISCLOSURES*** . I want to delete this line too. Thank you (2 Replies)
Discussion started by: reachsamir
2 Replies

4. UNIX for Dummies Questions & Answers

Deleting whole lines from a file

I have a file with 65 sets of 35 coordinates, and would like to isolate these coordinates so that I can easily copy the coordinates to another file. The problem is, I've got a 9 line header before each set of coordinates (so each set is 44 lines long). There are a zillion threads out there about... (3 Replies)
Discussion started by: red baron
3 Replies

5. UNIX for Advanced & Expert Users

Deleting lines from a file

How I can delete 100 lines anywhere in a file without opening a file and without renaming the file. (11 Replies)
Discussion started by: Nirgude07
11 Replies

6. Shell Programming and Scripting

Deleting lines in a flat file

Hi Friends I have a flat file which has sentence like "Notice generated". It can be anywhere in the flat file. What I want to do is, I want to delete all the lines which are above sentence "Notice generated". How can I do it. Kindly advice. Anushree (5 Replies)
Discussion started by: anushree.a
5 Replies

7. Shell Programming and Scripting

Problem in deleting lines from the file

Hi All I am not able to delete few line from long file. I have a big file which is of 53998 B in size i want to delete lines starting from 32768 to 53998 and collect remaining file in new file. It is giving exception sed: command garbled: 32768,$countd Please find the sample script... (2 Replies)
Discussion started by: rajeshorpu
2 Replies

8. Shell Programming and Scripting

deleting lines from file

We have a server that logs transactions to a file. I want to write a script that will delete the first 50 lines of the file daily without renameing the file or moving the file. (8 Replies)
Discussion started by: daveisme
8 Replies

9. Shell Programming and Scripting

Re: Deleting lines from big file.

Hi, I have a big (2.7 GB) text file. Each lines has '|' saperator to saperate each columns. I want to delete those lines which has text like '|0|0|0|0|0' I tried: sed '/|0|0|0|0|0/d' test.txt Unfortunately, it scans the file but does nothing. file content sample:... (4 Replies)
Discussion started by: dipeshvshah
4 Replies

10. Shell Programming and Scripting

Deleting selected lines in a file

Hi Guys , I have two files say a1 and a2 having following contents a1 dag wfd a2 dag wfd chire hcm I want to delete only the lines in a2 which are in a1 and final output of a2 should be a2 chire hcm (6 Replies)
Discussion started by: Pradeep_1990
6 Replies
VOS_HELP(1)						       AFS Command Reference						       VOS_HELP(1)

NAME
vos_help - Displays help for vos commands SYNOPSIS
vos help [-topic <help string>+] [-help] vos h [-t <help string>+] [-h] DESCRIPTION
The vos help command displays the complete online help entry (short description and syntax statement) for each command operation code specified by the -topic argument. If the -topic argument is omitted, the output includes the first line (name and short description) of the online help entry for every vos command. To list every vos command whose name or short description includes a specified keyword, use the vos apropos command. OPTIONS
-topic <help string>+ Identifies each command for which to display the complete online help entry. Omit the vos part of the command name, providing only the operation code (for example, specify create, not vos create). If this argument is omitted, the output briefly describes every vos command. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The online help entry for each vos command consists of the following two or three lines: o The first line names the command and briefly describes its function. o The second line lists aliases for the command, if any. o The final line, which begins with the string "Usage", lists the command's options in the prescribed order. Online help entries use the same symbols (for example, brackets) as the reference pages in this document. EXAMPLES
The following command displays the online help entry for the vos create command: % vos help create vos create: create a new volume Usage: vos create -server <machine name> -partition <partition name> -name <volume name> [-cell <cell name>] [-noauth] [-localauth] [-verbose] [-help] PRIVILEGE REQUIRED
None SEE ALSO
vos(1), vos_apropos(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 2012-03-26 VOS_HELP(1)
All times are GMT -4. The time now is 01:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy