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
  • 66,199
  • 35
  • 114
  • 250
Hrishi
  • 1
  • 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
  • 21,637
  • 21
  • 47
  • 71
Hrishi
  • 1
  • 1