#! /usr/bin/ksh # # Author: Mike Fleming mike@tauzero.co.uk # # viewtree - use file viewer to show a tree view of directories # # Default is to show view from current directory down, starting # directory can be specified # 1st sed: remove colons # 2nd sed: replace higher level folder names with dashes # 3rd sed: indent graph three spaces # 4th sed: replace first dash with a vertical bar fv "/dev/null | grep ':$' | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"