home | list info | list archive | date index | thread index

Re: looking for particular "tree"-like recursive directory display

  • Subject: Re: looking for particular "tree"-like recursive directory display
  • From: Dianne Skoll <dianne [ at ] skoll [ dot ] ca>
  • Date: Mon, 24 Feb 2020 15:45:29 -0500
On 2020-02-23 13:02, Robert P. J. Day wrote:

>   for the sake of some documentation and web pages i'm writing, i'd
> like to generate "tree" like output for a directory structure, but
> without the standard indentation vertical and horizontal lines,
> replacing that with space indentation (ideally selectable).

> yes, i could hack up a filter, but it
> would be just ducky if some standard command already did what i'm
> after.

Filtering is the way to go, IMO.  This worked for me on Debian Buster:

tree -F | sed -e 's/|/ /g' -e 's/`/ /g' -e 's/ -- /    /g'

Unless you have files with "|", "`" or " -- " in their names, you should
be safe.

Regards,

Dianne.

To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org