Automation

 View Only
  • 1.  [Help] Need help to remove a string in text file

    Posted Jun 11, 2015 04:25 AM

    Hi all,

    I have a text like that

    REPORT

    Wednesday, June 10, 2015 2:31:56 PM

    **********************************************************************************

    HOST: 10.9.1.185

    TestVM is powered off

    **********************************************************************************

    HOST: 10.9.0.84

    All VMs are powered off

    **********************************************************************************

    HOST: 10.9.0.85

    **********************************************************************************

    HOST: 10.9.0.86

    I want to remove the

    **********************************************************************************

    HOST: 10.9.0.85

    **********************************************************************************

    HOST: 10.9.0.86

    because there is no information after the HOST  10.9.0.85 or HOST : 10.9.0.86

    It will reduce the content of the report

    I need a script to remove this text

    Could anyone help me?

    Thank you for your help



  • 2.  RE: [Help] Need help to remove a string in text file
    Best Answer

    Posted Jun 11, 2015 06:21 AM

    What is generating the report? It is probably easier to just not write it to the file in the first place...



  • 3.  RE: [Help] Need help to remove a string in text file

    Posted Jun 12, 2015 02:45 AM

    Thanks sneddo

    I will review my script and may rearrange it, so that it doesn't write in the first place, that's easier