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

189 views      
 

Messages in this Thread

 
94,589 Postings in 11,932 Threads, 348 registered users, 13 users online (1 registered, 12 guests)
Index | Admin contact |   Forum Time: Nov 18, 2019 - 10:06 pm EST  |  Hits:29,171,179  (12,922 Today )
RSS Feed