I would recommend learning perl and regular expressions. Try using the
following script:
Script Name: unclog.pl (or whatever you want to call it)
=======================
#!/usr/bin/perl -wn
print if (!/^.*\.{9} .*$/);
Make sure the permissions on unclog.pl are set to execute (i.e. 770)
Then run the script as follows:
unclog.pl wget-log > wget-unclog
Hope this s.
Art Ramos
Martin Jørgensen wrote:
> Hi,
>
> I have a +200 kb log file from which I want to remove lines such as this
> one:
>
> 5950K ......... ......... ......... ......... ......... ......... 59%
> 5600K ......... ......... ......... ......... ......... ......... 60%
> 5650K ......... ......... ......... ......... ......... ......... 61%
>
> It's called wget-log. I'm not really good at linux bash shells so how do
> I remove those lines with "......... ......... ......... ........." ?
>
> I suppose I could do something like "cat wget-log |
> (some-command/grep?) > newfile" but there are probably better methods,
> including not creating a new file...
>
>
> Best regards
> Martin Jørgensen
>
> --
> ---------------------------------------------------------------------------
> Home of Martin Jørgensen - http://www.martinjoergensen.dk