Simulate a tree command using Shell Script that displays all the directories recursively

hi there - good evening dear Arduino-experts,

i want to simulate a tree command using Shell Script that displays all the directories recursively in this format:


|-- Lorem
|-- Lorem
|-- Lorem
    |-- Lorem
    |-- Lorem
|-- Lorem
`-- Lorem

how can this be achived

note: i want to do this on a MX-Linux system - well i can do this with Tree - but wait. I guess that tree has to be installed first..

Where is the tree structure ?
Where do you want to display it ?