I don't know whether this will be useful to anyone else, but I wanted to use the Linux tree command to generate file system trees in CSV format on OS X. This should work pretty much as is on Linux, although you may need or want to change the paths and optimize the usage of sed.
This uses the Linux "tree" command, which is not standard on OS X.
"The Tree Command for Linux Homepage"
"Terminal fun: Options for printing folder and subfolder contents - CNET"
"Linux and Unix tree command help and examples"
OS X uses BSD sed, not GNU sed. Thus, the sed portion of the following could probably be more concise with the GNU version of sed.
This will generate a file system tree with just directories in CSV format:
tree -ad --noreport | sed -e "s/├── /,/g" -e "s/└── /,/g" -e "s/│ /,/g" -e "s/ /,/g" > ~/Desktop/"${PWD##*/} tree (just dirs).csv"
This will generate a file system tree with both directories and files in CSV format:
tree -a -I \.git --noreport | sed -e "s/├── /,/g" -e "s/└── /,/g" -e "s/│ /,/g" -e "s/ /,/g" > ~/Desktop/"${PWD##*/} tree.csv"