Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 'mv' all files containing a certain string to a sub-directory
- X-seq: zsh-users 10915
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: 'mv' all files containing a certain string to a sub-directory
- Date: Tue, 31 Oct 2006 15:32:52 +0000 (UTC)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SuccessTheory
- References: <Xns986D84207EE85zzappergmailcom@xxxxxxxxxxx> <200610311419.k9VEJaKf009817@xxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxx> wrote in news:200610311419.k9VEJaKf009817
@news01.csr.com:
> zzapper wrote:
>> I want to 'mv' all files containing a certain string to a sub-directory.
>> Should be trivial but cant think how w/o creating a temporary file
>
> mv *(.e:'grep -q string $REPLY':) subdir
>
Seeing PWS's reply reminded me of the conventional way to do this
mv $(grep -il "userid" *.php) done
--
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
Messages sorted by:
Reverse Date,
Date,
Thread,
Author