From: James Edward Gray II Date: 2006-04-13T02:42:39+09:00 Subject: Re: Shame on me poorr newbie " unexpected kend" On Apr 12, 2006, at 12:35 PM, alex mic wrote: > Hi, > > I am trying to learn ruby through a udev utility coding. > I usually manage to debug on my own but in this case i dont understand > what is wrong... > > def finddevice() > puts "We are now trying to find the device" > found=0 > store=0 > quest="u" > while found!=1 > io = IO.popen("cat /proc/scsi/usb-storage/#{store}", "r+") > io.close_write > str = io.read > while quest!="y" or quest!="n" > puts "This is what is found on /proc/scsi/usb-storage/# > {store}. Is > it your device [y/n]" > quest=gets.chop!.downcase > if quest=="y" > found=1 > @procdata = str > else > store ++ That's not a valid Ruby statement. Try: store += 1 > end > end > end > end Hope that helps. James Edward Gray II