Remove path from example filename in output

This commit is contained in:
jgromes 2025-01-01 10:33:57 +01:00
parent fbed66f96a
commit c350f7ad5e

View file

@ -11,7 +11,13 @@ rm -f $out_file
echo "text,data,bss,dec,hex,filename" > "$out_file" echo "text,data,bss,dec,hex,filename" > "$out_file"
# convert to CSV # convert to CSV
awk 'NR > 1 {print $7 "," $8 "," $9 "," $10 "," $11 "," $12}' "$in_file" >> "$out_file" awk 'NR > 1 {
split($12, path_parts, "/");
filename_with_ext = path_parts[length(path_parts)];
split(filename_with_ext, filename_parts, ".");
filename = filename_parts[1];
print $17 "," $8 "," $9 "," $10 "," $11 "," filename
}' "$in_file" >> "$out_file"
# remove input file # remove input file
rm -f $in_file rm -f $in_file