Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to hide lines that don't match?

    Help wanted · · · – – – · · ·
    hide lines
    2
    2
    1933
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Robert Łach
      Robert Łach last edited by

      Hello. I like in the title. I want to hide (not delete) lines.
      In text file I have lines with “<RawDialog>RANDOM VALUE</RawDialog>” and I want too hide everything that don’t have it. I don’t want to delete other lines only hide them because I want to change values of each line with this command and save file with keeping other lines untouched. File have about 250k lines so searching matching line then replacing value and again takes some time. It is any way to hide these lines?
      Don’t answer with something like “Use “Find and replace”” becasue each line have other values.
      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • Jim Dailey
        Jim Dailey last edited by

        I don’t quite understand how you plan to modify the <RawDialog> lines without using search and replace (or at least using search inside some macro). Can you clarify?

        It appears you might assume that if the lines are hidden, then search/replace will not affect them. I did a quick experiment, and that doesn’t seem to be the case since my hidden lines were modified by a Replace operation.

        Perhaps using a tool like sed, AWK, PERL, or Python would be a better way to proceed.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors