From owner-freebsd-questions Tue Feb 8 14:38: 7 2000 Delivered-To: freebsd-questions@freebsd.org Received: from math.udel.edu (math.udel.edu [128.175.16.7]) by builder.freebsd.org (Postfix) with ESMTP id 599FB439C for ; Tue, 8 Feb 2000 13:36:29 -0800 (PST) Received: from math.udel.edu (sisyphus.math.udel.edu [128.175.16.167]) by math.udel.edu (8.9.3+Sun/8.9.1) with ESMTP id PAA02833; Tue, 8 Feb 2000 15:42:46 -0500 (EST) Message-ID: <38A07FC6.B065C6C@math.udel.edu> Date: Tue, 08 Feb 2000 15:42:46 -0500 From: Peter Schwenk Organization: University of Delaware X-Mailer: Mozilla 4.7 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en, fr, de, ko MIME-Version: 1.0 To: darryl@osborne-ind.com Cc: freebsd-questions@freebsd.org Subject: Re: OFF TOPIC - Shell Script Question References: <001101bf7273$e44dc250$070101c0@ruraltel.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The 'find' command is useful. It can do things based on the timestamp on the file. Plus you can use the '-exec' parameter to do things to the files it finds (like 'mv' them). Darryl Hoar wrote: > Greetings, > I have a directory with a ton of files in it. I need to move some of > them to another > directory. Here's what I'm thinking: > > ls -tl | grep '1999' | awk '{print "mv " $9 " /home/darryl/test"}' > > but it does not 'execute' the mv command. How do I get this cooking ? > > BTW, I don't plan on doing this a bunch, so I would preferr Not to > install, learn > perl. Instead, use the shell. > > thanks, > > Darryl Hoar > Computer Programmer / Systems Analyst > Osborne Industries, Inc. > darryl@osborne-ind.com > (785) 346-2192 > > PS. If perls the only ticket, then I'll install and learn it. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- PETER SCHWENK | UNIX System Administrator Department of Mathematical Sciences | University of Delaware schwenk@math.udel.edu | (302)831-0437 <-NEW!!! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message