You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by "K. John Wu" <kw...@lbl.gov> on 2010/04/26 07:10:46 UTC

bash option cdspell

Just thought someone else might encounter the same problem.  If your 
initialization file for bash has the option cdspell set, such as 
through the following command

shopt -s cdspell

then the bin directory may not be set correctly in the shell script 
that set bin through the following command

bin=`cd "$bin"; pwd`

An alternative is to make sure cdspell is not set.  The second 
alternative is to set the value of bin through

cd "$bin" && bin=${PWD}

This allows bin to take on the correct value no matter whether cdspell 
is set or not.

John