From: samba Date: 2008-09-15T23:32:49+09:00 Subject: Re: shell script On Sep 15, 7:36 pm, Vandana wrote: > Hi All, > > I have a shell script which I use to call a ruby program. I pass > parameters from the shell script to the ruby program > > Example: > > #!/bin/csh -f > > set DEST_DIR=/home/vandana/ > ruby test.rb -p $DEST_DIR > > ---------------------------------- > > When I execute the above, I get the error "Cannot convert nil to > String. I know that $DEST_DIR is not empty because when I do an echo > $DEST_DIR I see the /home/vandana/ > > What am I missing here? > > ---------------------------------------- > If I put the command "ruby test.rb -p $DEST_DIR" in quotes I get the > message command not found. > > Please help! > Thanks, try this ruby test.rb -p `echo $DEST_DIR`