VMware Cloud Community
vohuythao
Enthusiast
Enthusiast
Jump to solution

[Help] Need help to remove a string in text file

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

1 Solution

Accepted Solutions
sneddo
Hot Shot
Hot Shot
Jump to solution

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

View solution in original post

2 Replies
sneddo
Hot Shot
Hot Shot
Jump to solution

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

vohuythao
Enthusiast
Enthusiast
Jump to solution

Thanks sneddo

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

Reply
0 Kudos