A simple-directory printer: Part 2

Today I saw a posting asking “what does this command do?”

ls -R | grep “:$” | sed -e ‘s/:$//’ -e ‘s/[^-][^\/]*\//–/g’ -e ‘s/^/ /’ -e ‘s/-/|/’

Hint: it is related to my post which is now part 1.

I have to say, this clever use of 30 year old tools is just excellent. command line version using sed is just super clever. Very cool.

This entry was posted in General. Bookmark the permalink.

Leave a Reply

Your email address will not be published.