From: Rob Biedenharn Date: 2007-01-27T07:26:05+09:00 Subject: Re: script with -e command line option??? On Jan 26, 2007, at 5:08 PM, Suresh Unadrad wrote: > $ ruby -n -e "print" if test.txt > -e:1: No such file or directory - if (Errno::ENOENT) > > so it seems clear that ruby isn't getting the entire -e argument, > probably due to intereference by BASH. anyone know how to fix this? > > --su Well, the first thing to try is changing the kind of quotes. $ ruby -n -e 'print if /wombat/' test.txt If that doesn't work, I'd start to suspect that you have "ruby" defined as an alias or something to make the args be evaluated twice. -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com