Date: Tue, 21 Feb 2006 15:35:15 +0100 From: Kristian Vaaf <vaaf@broadpark.no> To: questions@freebsd.org Subject: Cool listing script (needs a fix) Message-ID: <7.0.1.0.2.20060221153406.00ed12d8@broadpark.no>
next in thread | raw e-mail | index | archive | help
What's up everybody? When running this: -- #!/usr/local/bin/bash # # Print a structured file and folder list. # $ARBA: tree.sh,v 1.0 2007/11/11 15:05:09 vaaf Exp $ # # Include files: -a, --all # argument="-type d" case $1 in -a | --all) argument="" ;; esac tree='s,^.$,, /^$/d s,[^/]*/\([^/]*\)$,+-----\1, s,[^/]*/,| ,g' pwd; find -s . $argument -print | sed -e "$tree" -- I get: -- # tree -a /home/vaaf/usr +-----commands.txt +-----lyrics.txt +-----people.txt +-----public.txt -- How can I make the same script include an END notice? -- # tree -a /home/vaaf/usr +-----commands.txt +-----lyrics.txt +-----people.txt +-----public.txt | | END -- Anybody know how? Thanks! All the best, Vaaf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7.0.1.0.2.20060221153406.00ed12d8>