4 ms·
Here is a command that really opened my eyes to how cool sed, grep and piping are: ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -
by martythemaniak 18y ago
Here is a command that really opened my eyes to how cool sed, grep and piping are:
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
courtesy of this site: http://www.centerkey.com/tree/ http://www.centerkey.com/tree/
- silentbicycle 18y agoThis ties in nicely to the threads about the necessity of comments. :) As a bonus, most (all?) of the sed commands are also usable in vi's ex mode (the : prompt).