xref: /illumos-gate/usr/src/test/util-tests/tests/awk/gnu/getline2.sh (revision 20a7641f9918de8574b8b3b47dbe35c4bfc78df1)
1#!/bin/bash
2
3if [[ -z "$AWK" || -z "$WORKDIR" ]]; then
4    printf '$AWK and $WORKDIR must be set\n' >&2
5    exit 1
6fi
7
8SCRIPT=$WORKDIR/test.temp.script
9echo 'BEGIN { while( getline > 0) { print } }' > $SCRIPT
10
11$AWK -f $SCRIPT $SCRIPT $SCRIPT
12