nix/scripts/common/bin/glancepath

12 lines
164 B
Plaintext
Raw Normal View History

2023-09-05 13:52:52 -05:00
#!/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]
}
}
}