Thanks Liz, thats exactly what I was looking for.

 

CR

 

cid:CAD3D1F2-E42D-46DC-BAA5-4536C8821F21@domain_not_set.invalid

Cameron Rangeley

Technical Director

 

Phone:               +64 9 970 5550

Direct:                +64 9 970 5551

Mobile:              +64 21 343 757

Email:                 cameron.rangeley@turnstone.co.nz

Website:             www.turnstone.co.nz

 

 

From: wlug-bounces@list.waikato.ac.nz [mailto:wlug-bounces@list.waikato.ac.nz] On Behalf Of Liz Quilty
Sent: Tuesday, 9 March 2010 4:26 p.m.
To: Waikato Linux Users Group
Subject: Re: [wlug] CLI help

 


Heya

Just quote the rest of the command args like this
find /path/* -name "*.sql" -exec mysql "-ppassword -h <" {} \;

Liz

On 9 March 2010 16:19, Peter Reutemann <fracpete@gmail.com> wrote:

> Thanks
>
> I just tried the following variations with the following results.
>
> ARGON:/home # find /path/* -name "*.sql" -exec mysql -p password -h < {} \;
> -bash: {}: No such file or directory

Don't use a "*" in the search path. Unless you have a directory
"/path" your search won't find anything. You have to use "/home/path"
or, if you're already located in "/home", "path" by itself.


> ARGON:/home/ # find /path/ -name "*.sql" -exec mysql -p password -h < {} \;
> -bash: {}: No such file or directory

Same path problem.


> ARGON:/home/ # find /path/* -exec mysql -p password -h < {} \;
> -bash: {}: No such file or directory

"*" and path problem.


Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/           Ph. +64 (7) 858-5174
_______________________________________________
wlug mailing list | wlug@list.waikato.ac.nz
Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug


-- This message has been checked by the Turnstone managed spam filter and is believed to be clean.