qse/regress/awk/cou-020.awk

7 lines
185 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 <= 5 { print basename(FILENAME) ": " $0; }