(no title)
birchb
|
4 years ago
I love your enthusiasm, and thanks for the code. But 1) the above only works with sorted input and 2) adding it to find that would be like adding '-v' to 'cat' which as we know is considered harmful. http://harmful.cat-v.org/cat-v/
kazinator|4 years ago
All it is doing is hiding the redundancy with spaces to improve the human readability of find's output.
Here it is on the same data in breadth-first. Note the lack of any lexicographic sort: "interfaces" is flanked by "if-down.d" and "if-pre-up.d":
My first program in TXR Lisp in the grandparent comment builds the tree structure from the paths in any order and then prints that, so the paths could be scrambled into random order, yet it will recover the tree structure.However, not munging the the output in that way and just tweaking the original output for readability has some advantages