Re: [gentoo-user] OT - Question about new bash [SOLVED]

2006-01-30 Thread znx
First off.. OH! On 30/01/06, Alexander Skwar <[EMAIL PROTECTED]> wrote: znx wrote:> No it can't be that, see the "for" before hand, that will separate at> whitespace by defaultNo, it won't. Try it. True, ok so it did? and not now with bash3, I presume this is why it "worked" before and doesn't now?

Re: [gentoo-user] OT - Question about new bash [SOLVED]

2006-01-30 Thread Alexander Skwar
znx wrote: > No it can't be that, see the "for" before hand, that will separate at > whitespace by default No, it won't. Try it. > (unless you tamper with IFS), so the variable > tested will be without whitespace, No, it won't. > I can only guess its a charset or > similar that is causing the

Re: [gentoo-user] OT - Question about new bash [SOLVED]

2006-01-30 Thread znx
On 29/01/06, Norberto Bensa <[EMAIL PROTECTED]> wrote: Perhaps you got some file named: hey I am a long file name with spaces.jpg ;) No it can't be that, see the "for" before hand, that will separate at whitespace by default (unless you tamper with IFS), so the variable tested will be without whit

Re: [gentoo-user] OT - Question about new bash [SOLVED]

2006-01-29 Thread Norberto Bensa
Michael Sullivan wrote: > > for x in *.JPG; do > > if [ ! -e "current/$x" ]; then > > > > Hope that helps > > Yep, that worked! Thanks! Hmm, I wonder why it worked before? Perhaps you got some file named: hey I am a long file name with spaces.jpg ;) -- Norberto Bensa Ciudad de Buenos Aires,

Re: [gentoo-user] OT - Question about new bash

2006-01-29 Thread Alexander Skwar
Michael Sullivan wrote: > As I said, before the bash upgrade this worked perfectly. Now, when I > try to run it, I get this: > > [EMAIL PROTECTED] ~ $ system/resizepics > system/resizepics: line 11: [: too many arguments > system/resizepics: line 11: [: too many arguments I don't get this error

Re: [gentoo-user] OT - Question about new bash [SOLVED]

2006-01-29 Thread Michael Sullivan
On Sun, 2006-01-29 at 18:05 +, znx wrote: > Hi, > >for x in *.JPG; do > if [ ! -e current/$x ]; then > > I can't see anything wrong with this in particular, one thing that > springs to mind is to quote the string that you are testing: > > for x in *.JPG; do > if [

Re: [gentoo-user] OT - Question about new bash

2006-01-29 Thread znx
Hi,    for x in *.JPG; do  if [ ! -e current/$x ]; then I can't see anything wrong with this in particular, one thing that springs to mind is to quote the string that you are testing: for x in *.JPG; do   if [ ! -e "current/$x" ]; then Hope that helps

Re: [gentoo-user] OT - Question about new bash

2006-01-29 Thread fire-eyes
Michael Sullivan wrote: > I wrote a script a long time ago for resizing pictures uploaded to a > certain directory on my server box. The script was supposed to check to > see if any JPG files in the directory had not been resized, and if they > hadn't, it was supposed to resize them. It did some

[gentoo-user] OT - Question about new bash

2006-01-29 Thread Michael Sullivan
I wrote a script a long time ago for resizing pictures uploaded to a certain directory on my server box. The script was supposed to check to see if any JPG files in the directory had not been resized, and if they hadn't, it was supposed to resize them. It did some other stuff, but that was the im