Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Perl to remove text file entries???

Thread Tools
 
Search this Thread
 
Old Apr 7, 2003 | 04:39 PM
  #1  
rogp's Avatar
rogp
Thread Starter
Scooby Regular
 
Joined: Mar 2003
Posts: 455
Likes: 0
Post

Can I install Grep on Windows 2000 Pro? Or is it Unix/Linux only?

Roger

[Edited by rogp - 7/4/2003 7:51:10 PM]
Reply
Old Jul 4, 2003 | 03:11 PM
  #2  
rogp's Avatar
rogp
Thread Starter
Scooby Regular
 
Joined: Mar 2003
Posts: 455
Likes: 0
Question

I need to remove some er....evidence..of Internet usage. Fortunately the logs used to compile reports are in simple text file format. Can Perl be used to remove entries for certain IP addresses (i.e mine!)?

If so how?

Roger
Reply
Old Jul 4, 2003 | 04:12 PM
  #3  
David_Wallis's Avatar
David_Wallis
Scooby Regular
 
Joined: Nov 2001
Posts: 15,239
Likes: 1
From: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Post

open file
read a line in..

if not instr "your"ip
then write out line to a dummy file
else
Endif
rename dummyfile sourcefile

dont know perl so cant help
Reply
Old Jul 4, 2003 | 04:29 PM
  #4  
rogp's Avatar
rogp
Thread Starter
Scooby Regular
 
Joined: Mar 2003
Posts: 455
Likes: 0
Post

Doesn't have to be Perl.

Anything to beat Find and Replace in notepad.....

Roger
Reply
Old Jul 4, 2003 | 04:32 PM
  #5  
Andrewza's Avatar
Andrewza
Scooby Regular
 
Joined: Jan 2002
Posts: 667
Likes: 0
Post

grep -v "yourip" file > altereredfile
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
Nov 4, 2021 07:12 PM
Abx
Subaru
22
Jan 9, 2016 05:42 PM
Ganz1983
Subaru
5
Oct 2, 2015 09:22 AM
alcazar
Computer & Technology Related
2
Sep 29, 2015 07:18 PM
S600HBY
Subaru Parts
0
Sep 25, 2015 09:46 AM




All times are GMT +1. The time now is 02:52 AM.