fork(1) download
  1. #!/bin/bash
  2. s='[Test][PR:Cook][Completed]
  3. [Test][Finished][PR:Russell][Reviewer:SE]
  4. [Dump][Reviewer:SE][Complete][PR:Arnold]'
  5. awk 'match($0,/\[PR:[^]]*]/) {print substr($0,RSTART,RLENGTH)}' <<< "$s"
Success #stdin #stdout 0.01s 5496KB
stdin
Standard input is empty
stdout
[PR:Cook]
[PR:Russell]
[PR:Arnold]