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

145 views      
 

Messages in this Thread

 
94,426 Postings in 11,918 Threads, 348 registered users, 6 users online (1 registered, 5 guests)
Index | Admin contact |   Forum Time: Sep 22, 2019 - 12:08 am EDT  |  Hits:28,655,178  (20 Today )
RSS Feed