ZTree.com  | ZEN  | About...  

 Index   Back

command line SED   [Help!]

By: Ben Kent       
Date: May 15,2019 at 16:37
In Response to: [Help!] Search for text and replace with key (Neil Clough)

Neil

If using the command line is possible, then download sed from http://gnuwin32.sourceforge.net/packages.html and use this commandline

type input.txt | sed.exe -e ":x ; /\$$/ { N ; s/\$\n//g ; bx }" > output.txt

That sed syntax came from here https://www.gnu.org/software/sed/manual/sed.html#Multiline-techniques


Ben

391 views      
Thread locked
 

Messages in this Thread

 
95,075 Postings in 11,986 Threads, 350 registered users, 108 users online (1 registered, 107 guests)
Index | Admin contact |   Forum Time: Aug 12, 2020 - 11:09 pm EDT  |  Hits:33,074,774  (23,132 Today )
RSS Feed