0

I need to print the data below line contains "New External Cmd" and above line contains "Apply Succeeded", form the text file.

New External Cmd

ccs_mon

ldapaddm

root

cyberrec

Info    Apply Succeeded
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Hrishi
  • 1
  • Welcome to the site. Would you mind to share with us what you have already tried, and what tools are in principle available to you to do the task? – AdminBee Jan 06 '20 at 12:11

1 Answers1

0

It worked with below.

sed -n '/New External Cmd/,/Apply Succeeded/{//!p;}' filename
AdminBee
  • 22,803
Hrishi
  • 1