Awk / sed

Home Forums Other Open Source Awk / sed

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    ikon
    Member
    #151383

    Anyone have any experince with sed or AWK?

    im running a BASH script that collect data from MYSQL and echo’s the contents to a tab delimited file, before the data is echo to the file i pipe the output through sed to add formatting.

    im having some trouble with trying to add a new line after a certain pattern e.g

    Refill Liquid “2010/08/21 12:59” 00:06:00
    Refill Liquid “2010/08/21 11:57” 00:06:00
    Refill Liquid Im “2010/08/21 11:57” 00:06:00
    Preassure fault “2010/08/21 11:57” 00:06:00
    Refill Liquid “2010/08/21 14:57” 00:06:00
    Refill Liquid Im “2010/08/21 14:57” 00:06:00
    Pressure Fault “2010/08/21 14:57” 00:06:00

    Fields are tab delimited, im trying to add a line space where the timestamp field is different e.g

    Refill Liquid 2010/08/21 12:59 00:06:00

    Refill Liquid 2010/08/21 11:57 00:06:00
    Refill Liquid Im 2010/08/21 11:57 00:06:00
    Preassure fault 2010/08/21 11:57 00:06:00

    Refill Liquid 2010/08/21 14:57 00:06:00
    Refill Liquid Im 2010/08/21 14:57 00:06:00
    Pressure Fault 2010/08/21 14:57 00:06:00

    Thanks in advance.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.