Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Feb 2006 17:07:00 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Kristian Vaaf <vaaf@broadpark.no>
Cc:        questions@freebsd.org
Subject:   Re: Cool listing script (needs a fix)
Message-ID:  <20060221150700.GB27905@flame.pc>
In-Reply-To: <7.0.1.0.2.20060221153406.00ed12d8@broadpark.no>
References:  <7.0.1.0.2.20060221153406.00ed12d8@broadpark.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-02-21 15:35, Kristian Vaaf <vaaf@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 :)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060221150700.GB27905>