how to print tree on macOS code example
Example 1: osx tree
osx doesn't have tree, install by:
brew install tree
Example 2: terminal tree command
# yum install tree #RHEL/CentOS 7
# dnf install tree #Fedora 22+ and /RHEL/CentOS 8
$ sudo apt install tree #Ubuntu/Debian
# sudo zypper in tree #openSUSE