I am trying to write shell script to find Approved user in Jenkins Pipeline log file. I put here a part of pipeline script. how to pick 'MPPortal Administrator' or any user name following by 'Approved by' words? I am new to shell scripting and I have no idea to do it.
Timeout set to expire in 1 hr 30 min
[Pipeline] {
[Pipeline] input
APPROVE?
Proceed or Abort
Approved by MPPortal Administrator
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Library Policy Evaluation)
[Pipeline]
What I tried
grep Approved pipeline.log
then output was
Approved by MPPortal Administrator
expected Output:
MPPortal Administrator