I believe my problem is similar as found here but I was confused by the reply (and I can't comment in this question yet due to my low rep).
I have a bash script I need to run using slurm, so when the script needs input from the user, such as this:
Enter y or yes if you want to continue Compass and used cached results.
The script stops. This line shows up after this line of code runs:
compass --data compass_adipocytes_only_input_transposed.tsv --num-processes 10 --species mus_musculus
What can I do to make my script reply this with "y"?
This is the entire script
#!/usr/bin/env bash
#SBATCH --job-name=Compass
#SBATCH --ntasks=54
#SBATCH --output=compass.%j.out
#SBATCH --exclusive
# To activate this environment, use
. /tools/Miniconda3.7/etc/profile.d/conda.sh
conda activate /data04/projects04/MarianaBoroni/lbbc_members/lib/conda_envs/compass
which compass
compass --data compass_adipocytes_only_input_transposed.tsv --num-processes 10 --species mus_musculus
yes | compass
# To deactivate an active environment, use:
conda deactivate
exit
I executed it with the command
sbatch metabolismanalysis.sh