qse/regress/awk/cou-019.awk

8 lines
184 B
Awk
Raw Normal View History

function basename (str) {
ridx = str::rindex (str, "/");
if (ridx == 0) return str;
else return substr (str, ridx + 1);
}
FNR == 1, FNR == 5 { print basename(FILENAME) ": " $0; }