Sponsored Content
Full Discussion: Deleting processed lines
Top Forums Shell Programming and Scripting Deleting processed lines Post 302298238 by BootComp on Tuesday 17th of March 2009 03:42:19 AM
Old 03-17-2009
Deleting processed lines

I have a log file that I am processing. This contains messages from and to a server (requests and responses).
The responses to requests may not be in order i.e. we can have a response to a request after several requests are sent, and in some error cases there may not be any response message.

The log file is usually 2MB+ in size, so I am trying to see if there is a way I can find a request message and its response and after I find this delete it from the logfile and again start at the beginning of the logfile for the next request / response message.

Is there a way to delete the lines from the file OR can anyone suggest a better way to go about this?
 

10 More Discussions You Might Find Interesting

1. Programming

deleting lines

I am spooling a file from oracle and trying to delete the last line of the spooled file which I am unable to do. Problem is that this file can have multiple records each time and I have no way of knowing how many because the amount can vary. I had an idea of using a while loop to read the... (1 Reply)
Discussion started by: supercbw
1 Replies

2. Shell Programming and Scripting

deleting lines

I am trying deleting lines from a text file using sed.. sed '/OBJECT="ABC/{N;N;N;d; }' will do if i have to delete lines starting with Object and next 3 lines but I was looking for a way to delet lines starting with OBJECT and all the lines till it reaches a blank lines ..or it reaches a... (8 Replies)
Discussion started by: ajnabi
8 Replies

3. Shell Programming and Scripting

Deleting lines above a certain line

Hi, I have a file that gets automatically generated and it would look something like sakjsd adssad {{word}} sddsasd dsdsasa . . . So basically what I want to do is just keep the stuff below the {{word}} marker. The marker includes the brackets. Is there any command to delete the... (3 Replies)
Discussion started by: eltinator
3 Replies

4. UNIX for Dummies Questions & Answers

Deleting access_log.processed in crontab

Hi, I've worked out that my server was getting clogged with the access_log.processed file. I deleted it using the command > /var/www/vhosts/domain.com/statistics/logs/access_log.processed I also set that up as a crontab job for every Wednesday. What I was wondering is the version using... (4 Replies)
Discussion started by: chickenhouse
4 Replies

5. Shell Programming and Scripting

Deleting particular lines.

hi all, i have got a scenario in which i need to delete all the lines that ends with file names. e.g. input can be cms/images/services_icons/callback.png cms/cms/images/services_icons/sync.php cms/cms/images/services_icons and output should be cms/cms/images/services_icons ... (13 Replies)
Discussion started by: kashifv
13 Replies

6. Shell Programming and Scripting

deleting lines in ex

Hello, im using ex to manipulate some text. Im trying to delete all the lines except those on which a certain regex can be found. the important part of the script: ex temp << 'HERE' g/regex/p HERE this command prints the lines I want to end up with, but it doesnt delete the others.... (2 Replies)
Discussion started by: drareeg
2 Replies

7. UNIX for Dummies Questions & Answers

Help with deleting lines and saving them

I have a directory question where I ask the user which entry he wants to delete... echo "Which entry?" read entry sed '/^'$entry'/d' file This code does in fact delete that particular entry... HOWEVER, when I go to inquire about that same entry, it still populates like it was never... (4 Replies)
Discussion started by: itech4814
4 Replies

8. Shell Programming and Scripting

Running sed and counting number of lines processed

/bin/sed -n ';4757335,$ p' | wc -l /bin/sed -n ';4757335,$ p' | egrep "Failed" | egrep -c "PM late arrrival" how can i combine the above two sed commands into one? i want to count the number of lines between the specified line number and the end of the file. AND and i want to count how many... (5 Replies)
Discussion started by: SkySmart
5 Replies

9. Shell Programming and Scripting

File lines starts with # not processed or exclude that lines

I have requirement in my every files starting lines have # needs to be not processing or exclude the that lines. I have written a code like below, but now working as expected getting ERROR" line 60: 1 #!/bin/sh 2 echo ======= LogManageri start ========== 3 4 #This directory is... (1 Reply)
Discussion started by: Chenchireddy
1 Replies

10. Shell Programming and Scripting

File lines starts with # not processed or exclude that lines from processing

I have a file like below #Fields section bald 1234 2345 456 222 abcs dddd dddd ssss mmmm mmm mmm i need do not process a files stating with # I was written code below while read -r line do if then echo ${line} >> elif then ... (3 Replies)
Discussion started by: Chenchireddy
3 Replies
BOOTPTEST(8)						      System Manager's Manual						      BOOTPTEST(8)

NAME
bootptest - send BOOTP queries and print responses SYNOPSIS
bootptest [ -f bootfile ] [ -h ] [ -m magic_number ] server-name [template-file] DESCRIPTION
bootptest sends BOOTP requests to the host specified as server-name at one-second intervals until either a response is received, or until ten requests have gone unanswered. After a response is received, bootptest will wait one more second listening for additional responses. OPTIONS
-f bootfile Fill in the boot file field of the request with bootfile. -h Use the hardware (Ethernet) address to identify the client. By default, the IP address is copied into the request indicating that this client already knows its IP address. -m magic_number Initialize the first word of the vendor options field with magic_number. A template-file may be specified, in which case bootptest uses the (binary) contents of this file to initialize the options area of the request packet. CREDITS
The bootptest program is a combination of original and derived works. The main program module (bootptest.c) is original work by Gordon W. Ross <gwr@mc.com>. The packet printing module (print-bootp.c) is a slightly modified version of a file from the BSD tcpdump program. This program includes software developed by the University of California, Lawrence Berkeley Laboratory and its contributors. (See the copyright notice in print-bootp.c) SEE ALSO
bootpd(8) REFERENCES
RFC951 BOOTSTRAP PROTOCOL (BOOTP) RFC1048 BOOTP Vendor Information Extensions MAINTENANCE COMMANDS
10 June 1993 BOOTPTEST(8)
All times are GMT -4. The time now is 07:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy