Re: Script to strip lines from files



Christian Hansen <i.dont@xxxxxxxxxxx> wrote in
news:Xns9742C1E2EF074idontwantemail@xxxxxxxxxxxxxxx:

> I would apreciate som help making a script that be run from cron and can
> strip lines from files in the work dir.
>
> I want the files to only be able to have a certain number of lines (say
> five) that start with "IP" . If the file has more I would like the script
> to strip the first instance of "IP" until the file only contains five.
>
>
>
>
> CH
>

Another concept is that I would like the same script to also remove all
lines containing an IP without ident.

"IP *@127.0.0.1" would get removed and "IP myid@xxxxxxxxx" would be left
untouched.


Thanks.


CH
.



Relevant Pages

  • Script to strip lines from files
    ... I would apreciate som help making a script that be run from cron and can ... to strip the first instance of "IP" until the file only contains five. ...
    (comp.unix.shell)
  • Re: .Net Equivilant for sqlcmd or osql
    ... applications like SQL Management Studio work. ... Also, you do not have to strip the comments, it works just fine, ... Read EACH line into a string buffer. ... Read your script file and split it on the GO ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Script to strip lines from files
    ... > I would apreciate som help making a script that be run from cron and can ... If the file has more I would like the script ... > to strip the first instance of "IP" until the file only contains five. ... Unix Guy Consulting, LLC ...
    (comp.unix.shell)
  • [OT] FOAK: Regexp experts.
    ... I'm trying to set up a script to strip out URL's from the body of a ... Cab:^) - argue's like a girl ... GSX 1400 ...
    (uk.rec.motorcycles)
  • WMI is not seeing specific services on some servers
    ... The script runs well; however, on a few servers, even though both ... WMI reports PatchLink as missing. ... Dim x, strIP, varSubNet ...
    (microsoft.public.scripting.vbscript)