#! /usr/bin/gawk -f # Prepends each input line with its sequential number in the paragraph (starting with 1) BEGIN { NLIN=0 } /./ { NLIN++ printf "%3d %s\n", NLIN, $0 if ( /=/ ) NLIN=0 }