I would like to know how to grep the first occurrence of a string above(upwards) a reference string.
for (e.x.)in the below set, I would like to get the first occurrence of "AAA" above "XXX".
Thanks,AAA BBB AAA CCC XXX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |