I have an Awk script that counts the average of rows from every file from a given directory and its subdirectories and I have to print the filename and the average from a file like this
example.c : 5
So I have filenames like this ../labor1/munka/hazik_pagi4188/hazik/c_prog/lab1/fork2.c
and I want to get like this fork2.c
(I have different length file names with path).
awk
.basename
is specifically designed for this. – doneal24 Jun 09 '22 at 12:47