nix/scripts/bin/glancepath
2023-09-05 15:15:43 -05:00

12 lines
164 B
Awk
Executable file

#!/usr/bin/env -S awk -f
{
split(substr($0, 2), p, "/");
for (k in p) {
if (k == length(p)) {
printf "/%s", p[k]
} else {
printf "/%.3s", p[k]
}
}
}