From owner-freebsd-questions Tue Feb 8 13:48:46 2000 Delivered-To: freebsd-questions@freebsd.org Received: from typhoon.mail.pipex.net (typhoon.mail.pipex.net [158.43.128.27]) by builder.freebsd.org (Postfix) with SMTP id 4D5303E64 for ; Tue, 8 Feb 2000 13:27:32 -0800 (PST) Received: (qmail 22749 invoked from network); 8 Feb 2000 21:18:40 -0000 Received: from userca53.uk.uudial.com (HELO marder-1.) (62.188.150.121) by smtp.dial.pipex.com with SMTP; 8 Feb 2000 21:18:40 -0000 Received: (from mark@localhost) by marder-1. (8.9.3/8.9.3) id VAA01150; Tue, 8 Feb 2000 21:17:37 GMT (envelope-from mark) Date: Tue, 8 Feb 2000 21:17:37 +0000 From: Mark Ovens To: Darryl Hoar Cc: freebsd-questions@freebsd.org Subject: Re: OFF TOPIC - Shell Script Question Message-ID: <20000208211737.C329@marder-1> References: <001101bf7273$e44dc250$070101c0@ruraltel.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <001101bf7273$e44dc250$070101c0@ruraltel.net> Organization: Total lack of Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Feb 08, 2000 at 02:34:25PM -0600, 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 ? > Try $ for i in `ls -lt | grep 1999 | awk '{print $9}'` > do > mv $i /home/darryl/test > done $ > 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 -- Microsoft: Where do you want to go today? Linux: Where do you want to go tomorrow? BSD: Are you guys coming, or what? -Poster at LinuxWorld 2000 ________________________________________________________________ FreeBSD - The Power To Serve http://www.freebsd.org My Webpage http://ukug.uk.freebsd.org/~mark/ mailto:mark@ukug.uk.freebsd.org http://www.radan.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message