Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Feb 2000 15:42:46 -0500
From:      Peter Schwenk <schwenk@math.udel.edu>
To:        darryl@osborne-ind.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: OFF TOPIC - Shell Script Question
Message-ID:  <38A07FC6.B065C6C@math.udel.edu>
References:  <001101bf7273$e44dc250$070101c0@ruraltel.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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