none
find and remove sentence in txt file using batch RRS feed

  • Question

  • hi,

    I've thousand txt file that need to remove certain sentence within lines. Example data in txt file:

    Cat.Dog.Fish: com/klpcjg/wyxjvs102320/q.java
    Tiger.Cat.Cow: com/klpcjg/wyxjvs102320/q.java
    Lion.Tiger.Fish: com/mobclix/android/sdk/MobclixJavascriptInterface.java
    Tiger.Lion.Cat: com/klpcjg/wyxjvs102320/q.java

    I want to write a batch script that can remove the sentence whenever found ":" within the line. So, the output will looks like:

    Cat.Dog.Fish
    Tiger.Cat.Cow
    Lion.Tiger.Fish
    Tiger.Lion.Cat

    TIA


    • Edited by mie1107 Monday, March 12, 2018 2:51 AM
    • Moved by Bill_Stewart Tuesday, May 8, 2018 6:57 PM This is not "scripts on demand"
    Monday, March 12, 2018 2:43 AM

All replies