Date: Wed, 09 Feb 2000 02:19:32 -0500 From: Jim Conner <jconner@enterit.com> To: jmutter@ds.net, darryl@osborne-ind.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: OFF TOPIC - Shell Script Question Message-ID: <4.3.0.33.0.20000209020237.00cbfd50@pseudonet.org> In-Reply-To: <38A0828F.6E5E703C@ds.net> References: <001101bf7273$e44dc250$070101c0@ruraltel.net>
next in thread | previous in thread | raw e-mail | index | archive | help
At 15:54 08-02-00 -0500, James A. Mutter wrote:
>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 ?
> >
>
>And it's not going to execute the 'mv' command - no matter how hard you
>try. :)
>Instead, try something like this:
>
>for i in `ls -t`; do
> mv $i /home/darryl/test
>fi
You could also use the find command (something like but not exactly cuz Im
tired and can't remember all the correct args for find)
find /home/darryl -name "*" -exec mv {} /home/darryl/test \;
Something like that :) Sorry I couldn't be of too much more help.
Jim
>There are other ways to do this too - but I thought it might be useful
>to see how a simple loop works in 'sh'
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Today's errors, in contrast:
Windows - "Invalid page fault in module kernel32.dll at 0032:A16F2935"
UNIX - "segmentation fault - core dumped"
Humanous Beingsus - "OOPS, I've fallen and I can't get up"
-------------------------------
Jim Conner
NOTJames
jconner@enterit.com
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?4.3.0.33.0.20000209020237.00cbfd50>
