From: matz@... (Yukihiro Matsumoto) Date: 2001-10-17T00:51:17+09:00 Subject: [ruby-talk:22622] Re: Help (going stupid) ...`pwd` behaviour in ruby? Hi, In message "[ruby-talk:22615] Help (going stupid) ...`pwd` behaviour in ruby?" on 01/10/16, Steve Hill writes: |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" Try "bash -c pwd" to see the result. I suspect internally invoked bash has no way to know the proper alternative path. |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 By the way, I'm sorry to tell you that table is plain wrong. Ruby itself doesn't check any of RUBYSHELL, SHELL or COMSPEC. matz.