Cool listing script (needs a fix)
Fabian Keil
freebsd-listen at fabiankeil.de
Tue Feb 21 06:51:16 PST 2006
Kristian Vaaf <vaaf at broadpark.no> wrote:
> 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"
> 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?
echo "|"
echo "| END"
Fabian
--
http://www.fabiankeil.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060221/16d419c4/signature.bin
More information about the freebsd-questions
mailing list