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

38 views      
 

Messages in this Thread

 
94,273 Postings in 11,892 Threads, 347 registered users, 5 users online (0 registered, 5 guests)
Index | Admin contact |   Forum Time: May 19, 2019 - 5:15 pm EDT  |  Hits:27,728,808  (10,746 Today )
RSS Feed