http://qs321.pair.com?node_id=1144834


in reply to Re^4: tree command
in thread tree command

Doesn't the code I posted do exactly that with only one pass? I didn't add the display file bit, but that's trivial to add if you need it.

Here's the output of my code run on my junk directory, it seems to do what you ask :)

+-dbf +-palindrome +-plot +-rules | +-abc1 | | +-ba | | +-de | | +-te

Replies are listed 'Best First'.
Re^6: tree command
by Skeeve (Parson) on Oct 14, 2015 at 15:45 UTC

    if you didn't just post a part of the output, my tree would look like this:

    . \--dbf |--palindrome |--plot \--rules \--abc1 |--ba |--de \--te

    You see? I need to know, when I'm at "dbf", "rules", "abc1" and "te", that this one is the last element in the respective directory to stop printing the superfluous "|" characters you have.


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e