Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Apr 2002 08:21:42 +0200
From:      Buki <dev@null.cz>
To:        Giorgos Keramidas <keramida@ceid.upatras.gr>
Cc:        Brendan McAlpine <bmcalpine@macconnect.com>, questions@FreeBSD.ORG
Subject:   Re: Scripting question...
Message-ID:  <20020409082142.B14238@veverka.sh.cvut.cz>
In-Reply-To: <20020408211858.GA25469@hades.hell.gr>; from keramida@ceid.upatras.gr on Tue, Apr 09, 2002 at 12:18:58AM %2B0300
References:  <B8D75512.BD50%bmcalpine@macconnect.com> <20020408211858.GA25469@hades.hell.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 09, 2002 at 12:18:58AM +0300, Giorgos Keramidas wrote:
> On 2002-04-08 14:09, Brendan McAlpine wrote:
> > Can someone point me in the right direction here....?
> > 
> > I have a set of directories that contain radius log files from the last
> > month.  Each log file is named the same thing but the directories they
> > reside in are date stamped.  I want to write a script that searches the
> > directories, finds files named ?detail?, and cats the detail files into one
> > large combined file.  I know this should be simple, but I am drawing
> > blanks....
> 
> 	$ cd /var/log/radius
> 	$ cat */detail > /tmp/foo
> 
> For deeper nestings, you can probably get away with */*/detail, but
> it's safer to use find/xargs:
> 
> 	$ ( find . -name detail -type f | xargs cat ) > /tmp/foo

as the result should be one large file, I'd probable replace > with >>

Buki

> 
> Giorgos Keramidas                       FreeBSD Documentation Project
> keramida@{freebsd.org,ceid.upatras.gr}  http://www.FreeBSD.org/docproj/
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
PGP public key: http://dev.null.cz/buki.asc

		/"\
		\ /     ASCII Ribbon Campaign
		 X      Against HTML & Outlook Mail
		/ \     http://www.thebackrow.net


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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