Date: Thu, 8 Apr 2004 11:55:12 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Peter Risdon <peter@circlesquared.com> Cc: FreeBSD Question List <freebsd-questions@freebsd.org> Subject: Re: Pipes and commands that require two arguments Message-ID: <20040408165511.GD8182@dan.emsphone.com> In-Reply-To: <40757879.1010307@circlesquared.com> References: <40757879.1010307@circlesquared.com>
index | next in thread | previous in thread | raw e-mail
In the last episode (Apr 08), Peter Risdon said:
> I'm stuck with this, so hope nobody will mind the fact that is isn't
> strictly a FreeBSD question.
>
> I want to redirect the output of a command to mv(1) as the source
> file, and specify somehow a destination directory. Basically, I have
> to move several thousand files whose names match a number of patterns
> to a single directory.
The xargs manpage has an example that should get you on the right
track:
/bin/ls -1d [A-Z]* | xargs -J % cp -rp % destdir
--
Dan Nelson
dnelson@allantgroup.com
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040408165511.GD8182>
