Part of my bash script is to access a series of folders:
#lsit of folders
locations=("/Volumes/Israel\ Hernandez/Quantitative\ Data/Microglia\ data/3\ month/Mutant/314a"
"/Volumes/Israel\ Hernandez/Quantitative\ Data/Microglia\ data/3\ month/Mutant/314b"
"/Volumes/Israel\ Hernandez/Quantitative\ Data/Microglia\ data/3\ month/Mutant/314c")
for i in "${locations[@]}"
do (
#change to directory
cd "$i"
#convert tiff to png
However when I received errors:
/Users/luna/Documents/Ethan/scripts/microglia.sh: line 16: cd: /Volumes/Israel\ Hernandez/Quantitative\ Data/Microglia\ data/3\ month/Mutant/314a/: No such file or directory
I've tried to just cd into that folder on terminal and it absolutely worked. How come it just wont work in a shell script?