[lug] linux utility to list files hierarchically

Nate Duehr nate at natetech.com
Fri Feb 24 17:08:40 MST 2006


Walter Pienciak wrote:

> find . -print | sed -e 's,[^/]*/\([^/]*\)$,`--\1,' -e 's,[^/]*/,| ,g' 
> 
> Walter

That's a nifty sed trick, Walter!

There's a bug hiding in it.  It's printing ` in front of everything 
though!

( GRIN -- you'll see it.  You have an extra character in there, unless 
you wanted that ` in front of --. )

Thanks for sharing that one, that one's going in my hints/tricks IMAP 
folder.

It will come in handy... I'm sure!

Nate



More information about the LUG mailing list