Cool listing script (needs a fix)
Giorgos Keramidas
keramida at ceid.upatras.gr
Tue Feb 21 07:08:05 PST 2006
On 2006-02-21 15:35, Kristian Vaaf <vaaf at broadpark.no> wrote:
>
> 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?
Simple solutions are always the best (provided you can find them first,
of course). Just add the message you want to print after find finishes :)
More information about the freebsd-questions
mailing list