From: stephen.hill@... (Steve Hill) Date: 2001-10-16T23:45:45+09:00 Subject: [ruby-talk:22615] Help (going stupid) ...`pwd` behaviour in ruby? Hi there, I seem to be going a bit stupid this Tuesday afternoon....can anyone help out here. obed% pwd /home/stehill1/DL_baseline/OFF/1.0/200-500 this is a link into a filesystem, so obed% irb irb(main):01:0> `pwd` "/tmp_mnt/.autofa/research_rrm/rac/DL_baseline/OFF/1.0/200-500\n" OK, so I think I get the jist of the problem, which is that when ruby runs the backquoted process (`pwd`), it uses the default shell, which according to the pickaxe book (p141) is found in RUBYSHELL, or failing that in SHELL or COMSPEC. So trying that obed% echo $SHELL /bin/sh ...ok so lets change this to bash (the shell I am using outside ruby) obed% SHELL=/bin/bash obed% RUBYSHELL=/bin/bash obed% export SHELL RUBYSHELL so now lets see what happens... irb> ENV["SHELL"] /bin/bash irb> ENV{"RUBYSHELL"] /bin/bash irb> `pwd` "/tmp_mnt/.autofa/research_rrm/rac/DL_baseline/OFF/1.0/200-500\n" ....starts banging head against wall. I've been working on this for about 3 hours now. It's breaking a whole bunch of scripts (I've just moved a whole lot of data around), and even talking to the teddies in the next cube hasn't helped. Please, somebody put me out of my misery.... Thanks in advance Steve (feeling very stupid on a Tuesday afternoon)