Re: Pb with bash script under cygwin

2006-06-22 Thread Igor Peshansky
On Thu, 22 Jun 2006, ydubost wrote: > Hello, > > Thank you for all your suggestions. > I have finally managed to do what I wanted. > > There was several reasons: >1) the different -name options of find have to be enclosed in protected > bracket \( ... \) >3) the need to use the eval

Re: Pb with bash script under cygwin

2006-06-22 Thread ydubost
Hello, Thank you for all your suggestions. I have finally managed to do what I wanted. There was several reasons: 1) the different -name options of find have to be enclosed in protected bracket \( ... \) 3) the need to use the eval function 2) in a script, one need to protect the differ

Re: Pb with bash script under cygwin

2006-06-19 Thread Igor Peshansky
On Mon, 19 Jun 2006, Eric Blake wrote: > According to Igor Peshansky on 6/19/2006 8:50 AM: > > > > Another note I wanted to make is that '-exec' is evil, and you almost > > never have a reason to use it for a final action of the find (pipe the > > output to xargs instead -- "man xargs" for details

Re: Pb with bash script under cygwin

2006-06-19 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Igor Peshansky on 6/19/2006 8:50 AM: > > Another note I wanted to make is that '-exec' is evil, and you almost > never have a reason to use it for a final action of the find (pipe the > output to xargs instead -- "man xargs" for details).

RE: Pb with bash script under cygwin

2006-06-19 Thread Igor Peshansky
On Mon, 19 Jun 2006, ydubost wrote: > Thanks Dave for your answer. > I tried > ${Macommande} > and > $(${MaCommande}) > and directly > find . ${Extension} -exec rm {} \; -print > > but none of them worked, I then tried just a > find . -name *._cn" -print that should have s

RE: Pb with bash script under cygwin

2006-06-19 Thread Dave Korn
On 19 June 2006 13:51, ydubost wrote: > So thanks to you idea of executing bash -x, I looked at what's happening and > the result is that the command executed is : > find . -name '"*._SN"' -o -name '"*._sn"' -o -name '"*._lg"' -o -name > '"*.LG"' -exec rm '{}' '\;' -print > For a unknown rea

RE: Pb with bash script under cygwin

2006-06-19 Thread ydubost
Thanks Dave for your answer. I tried ${Macommande} and $(${MaCommande}) and directly find . ${Extension} -exec rm {} \; -print but none of them worked, I then tried just a find . -name *._cn" -print that should have sent me back some results but did not! So thanks

RE: Pb with bash script under cygwin

2006-06-19 Thread Dave Korn
On 19 June 2006 12:45, ydubost wrote: > Hello there, > > I have been working on a very simple script for 3 hours not been able to > understand what's wrong with it. Run it under "bash -x" to see what's actually being executed and so what's going wrong. > TYPE_FIC_UPPER="._BC ._CH ._CL ._CM .