Wow, that sounds so complicated in the name, but I guess that is not entirely true.
I have text files that have basically this layout:
Stimulus ... ... ... ... Response Stimulus ... ... ... ... Response
I used sed to get everything in between, and then get the extra information I need.
sed -n -e '/Stimulus/,/Response/ p'
However, sometimes the participants do not respond, and in this case the file looks as follows:
Stimulus ... ... ... ... Stimulus ... ... ... ... Response
In this special case, my script will not get what I'm looking for. So, I'm looking for a way to extract information if and only if pattern2 will follow pattern1, not pattern1.
Let me know if I state it unclear. I am more than happy to provide further information.
source share