SED help (or AWK!)

Wawrzyniec Niewodniczański wawrzek at gmail.com
Wed Jan 28 11:31:11 CET 2009


2009/1/28 Longman <clug at gasops.co.uk>:
>
> Hi peeps.
>
> I want to copy a load of data from a log file that starts 'ORA-' and put
> the lines into another file.  Basically I have a load of Oracle errors
> in a log file and the file is very big and I am interested in only the
> errors (file is 700MB but I hope that there are less than 1MB of errors!).
>
> Example:
>
> ERROR at line 1:
> ORA-00904: "TIMESTAMP": invalid identifier
>
> And something like ?
>
> sed -n '/ORA/w output.log' errors.txt
>

[...]
> Yes that's a lot of wants for a Tuesday :-)

Why not use the grep and redirect it to file?

Wawrzek
-- 
 Wawrzyniec Niewodniczański      vel Wawrzek Larry or LarryN
    Linux User #177124              E-MAIL: wawrzek at gmail.com
 PhD in Quantum Chemistry            WWW: http://wawrzek.name
 MSc in Molecular Engineering           JID: larryn at chrome.pl



More information about the CLUG mailing list