Re: Need to cp files after grep

From: Alan Connor (zzzzzz_at_xxx.yyy)
Date: 06/30/04


Date: Wed, 30 Jun 2004 04:31:46 GMT

On 29 Jun 2004 21:04:11 -0700, rash <rashidvoip@yahoo.com> wrote:
>
>
> here is the example
>
> I have five files bca1,bca2,bca2....
>
> here is grep I do
>
> $grep -c "string" bca* | grep ":0"
> $bca2:0
> bca5:0
>
>
>
> then want to cp these two files to tmp1(dir)
>
> I am taking too much time to do this simple task
>
> thanks
> Rashid

Give this a try, Rashid:

cp $(grep -l "string" bca*) tmp1

AC

-- 
It's all Geek to me.