#!/bin/bashs='Pattern 1 AAAAAAAAAABBBBBBBBBB Pattern 2'awk -v ORS= '/Pattern 1/{flag=1; next} /Pattern 2/{flag=0} flag' <<< "$s"
Standard input is empty
AAAAAAAAAABBBBBBBBBB
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!