Need to copy the lines just before a particular string using batch file
问题 I have a file like this: Executing resource: D:\waste2\SPC\depks_rtl_teller_custom.spc Executing resource: D:\waste2\SPC\ifpks_msg_incoming_cluster.spc Failed to execute: Executing resource: D:\waste2\SQL\casapks_batch.sql Failed to execute: Executing resource: D:\waste2\SQL\depks_decbatop_kernel.sql Executing resource: D:\waste2\SQL\depks_services.sql Failed to execute: I need a batch file or perl script or ANT script to pick all the lines just in front of the string "Failed to execute:" and