Thread: Script required

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    1
    Rep Power
    0

    Script required


    Hi..
    I am very new to unix scripting. I have nearly 200 logfiles on my system. Could someone pls give me a script which could grep for 'errors|warnings' in all the logfiles..Pls help me with this as I am stuck.

    waiting for response,
    unix12
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    7
    Rep Power
    0
    Wont this work:

    Code:
    bash$ cat * || grep -V warninglines > newlogfile.txt
    im not sure if it works, but by reading the grep man it says V removes lines from output or so.

    Just hoping this helps.

IMN logo majestic logo threadwatch logo seochat tools logo