From owner-freebsd-questions@FreeBSD.ORG Tue Feb 21 18:38:50 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D970716A420 for ; Tue, 21 Feb 2006 18:38:50 +0000 (GMT) (envelope-from vaaf@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 442A443D73 for ; Tue, 21 Feb 2006 18:38:33 +0000 (GMT) (envelope-from vaaf@broadpark.no) Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0IV100ISPVS0N430@osl1smout1.broadpark.no> for questions@freebsd.org; Tue, 21 Feb 2006 19:38:24 +0100 (CET) Received: from urban.broadpark.no ([213.187.181.70]) by osl1sminn1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0IV1007JCVS086A0@osl1sminn1.broadpark.no> for questions@freebsd.org; Tue, 21 Feb 2006 19:38:24 +0100 (CET) Date: Tue, 21 Feb 2006 19:38:26 +0100 From: Kristian Vaaf In-reply-to: <20060221155119.1dbfe2bd@localhost> To: Fabian Keil Message-id: <7.0.1.0.2.20060221193746.021f1e28@broadpark.no> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT References: <7.0.1.0.2.20060221153406.00ed12d8@broadpark.no> <20060221155119.1dbfe2bd@localhost> Cc: questions@freebsd.org Subject: Re: Cool listing script (needs a fix) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2006 18:38:51 -0000 At 15:51 21.02.2006, Fabian Keil wrote: >Kristian Vaaf 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/ > Wonderful man, thanks a lot! :)