ITeye博客

使用一行命令实现tree功能

harry · 2009-08-18 11:41 · Unix/Linux · Markdown

使用ls, grep, and sed实现tree命令功能,如下:

ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。