The separator doesn't get printed when I use this script on OpenBSD. It does get printed on FreeBSD or if I used GNU grep. The issue appears to be an off-by-one of some sort because removing the empty line makes the separator disappear on both systems.
#!/bin/sh grep -E -A6 '^(.w)?g' <<'EOF' $wg a b c d e f g = \ ds -> h i j EOF
