pure bash solution
#!/bin/bash
filename=$1;
# find the line numbers of matches
mapfile -t index < <(grep -hn -e Location1 -e Location2 $filename | grep -o '^[[:digit:]]\+');
# subtract them to get the offset
declare -i grep_offset=$((index[1] - index[0]));
# no need to use ${} inside ((...)) operator
# declare -i grep_offset=$((${index[1]} - ${index[0]}));
# decrease by one, to ignore second match
let --grep_offset
# match from first one up to $grep_offset , then tail it + ignoring first match
grep -A $grep_offset Location1 $filename | tail -n $grep_offset
input
something above
something above
something above
something above
Location1
more lines..
more lines..
mores lines.
mores lines.
more lines..
more lines..
Location2
something below
something below
something below
something below
output
more lines..
more lines..
mores lines.
mores lines.
more lines..
more lines..
Perl one-liner including the matches:
perl -lne '$/=unset; /Location1.*Location2/gs && print $&' file.txt
Location1
more lines..
more lines..
mores lines.
mores lines.
more lines..
more lines..
Location2
Perl one-liner excluding the matches
perl -ne '$/=unset; /(?<=Location1\n).*(?=Location2)/gs && print $&' file.txt
more lines..
more lines..
mores lines.
mores lines.
more lines..
more lines..