xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/rsnulbig2.sh (revision 1a2d662a91cee3bf82f41cd47c7ae6f3825d9db2)
1#!/bin/bash
2
3if [[ -z "$AWK" ]]; then
4    printf '$AWK must be set\n' >&2
5    exit 1
6fi
7
8$AWK 'BEGIN { ORS = ""; n = "\n"; for (i = 1; i <= 10; i++) n = (n n); \
9    for (i = 1; i <= 128; i++) print n; print "abc\n" }' | \
10    $AWK 'BEGIN { RS = ""; ORS = "\n\n" };{ print }' 2>&1 | \
11    $AWK '/^[^a]/; END { print NR }'
12