Is there any linux command that I can call from a Bash script that will print the directory structure in the form of a tree, e.g.,
folder1 a.txt b.txt
To add Hassou's solution to your .bashrc, try:
alias lst='ls -R | grep ":$" | sed -e '"'"'s/:$//'"'"' -e '"'"'s/[^-][^\/]*\//--/g'"'"' -e '"'"'s/^/ /'"'"' -e '"'"'s/-/|/'"'"