ref: 2a3ee1c2e3e1ea6477ca8715bf1531dbf34367a1 dir: /testdir/t.in3/
{ x[NR] = $0 } END { for (i in x) if (x[i] ~ /shen/) break print i, x[i] }