I am using a shell script to install CELLECT and I am making some specific subfolders in the code. When copy+pasted into the terminal, it runs without issue. But when I call bash to run the script, folders get a ? added to the end of the name. I have no idea what is causing this issue or how to fix it.
Code being used:
wd=./Documents
CELLECT_dir=./Documents/CELLECT
sumstats_dir=./Documents/CELLECT/data/sumstats
ldsc_dir=./Documents/CELLECT/data/ldsc
ref_dir=./Documents/CELLECT/data/ref
munged_dir=./Documents/CELLECT/data/sumstats/munged_sumstats
h2_dir=./Documents/CELLECT/heritability/analysis_phase3
h2_output_dir=./Documents/CELLECT/heritability/output_phase3
rg_dir=./Documents/CELLECT/bivariate_correlations/analysis_phase3
rg_output_dir=./Documents/CELLECT/bivariate_correlations/output_phase3
brew install git-lfs
git lfs install
git clone --recurse-submodules https://github.com/perslab/CELLECT.git $CELLECT_dir
cd $CELLECT_dir
mkdir -p ${CELLECT_dir}/data/sumstats
mkdir -p ${CELLECT_dir}/data/ref
mkdir -p ${sumstats_dir}/munged_sumstats
Even if I make an empty ./Documents/CELLECT directory before the git command it still creates a CELLECT? folder to install the files in.
Adding the following code is a MacGyvered fix that works but has to be done for any folders created, so I would like to solve the root issue instead of using this bandaid:
mv ${wd}/CELLECT? ${wd}/CELLECT
mv ${CELLECT_dir}/data/ref? ${CELLECT_dir}/data/ref
mv ${sumstats_dir}/munged_sumstats? ${sumstats_dir}/munged_sumstats