Article 5ETZD Why is BASH lying?

Why is BASH lying?

by
TBotNik
from LinuxQuestions.org on (#5ETZD)
All,

In my BASH script I'm using:
Code:[ -d '/My & Path/MyDir/' ] && src-dir='/My & Path/MyDir/' || echo "Error: Directory not found!"BASH is always returning:
Code:No such file or directory
Error: Directory not found!However from the command line I issue:
Code:cd '/My & Path/MyDir/'
ls -alAnd it goes to the directory and displays all files there, so my Q is:

Why is BASH always lying?

Oh! Just to make sure BASH is not calling the file index I ran "updatedb", but still have the same results from my script!

Cheers!

TBNKlatest?d=yIl2AUoC8zA latest?i=S5pLCaoqCSg:Xi-YdR5Smg8:F7zBnMy latest?i=S5pLCaoqCSg:Xi-YdR5Smg8:V_sGLiP latest?d=qj6IDK7rITs latest?i=S5pLCaoqCSg:Xi-YdR5Smg8:gIN9vFwS5pLCaoqCSg
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments