I've looked over a lot of docs, discussions and tutorials but don't see what's causing a string to not be expanded into parameters using a BASH script. The argument is being passed from an Ubuntu 18.04 host to a container running Ubuntu 14.04.
Here's the whole string output from echo $@
'/mnt/pathfinder/contexts/chase/software/util/scripts/perception/movingObstacleDetection/training/cloud/buildTrainTestForMOD2.py --traindir /mnt/pathfinder/logs/other/MOD2/classifiers/2022.01.06_23.19.24__chase --context chase' /mnt/pathfinder/logs/other/MOD2/classifiers/2022.01.06_23.19.24__chase/build_dataset_training_output.txt
I want to assign the portion within single quotes to $1
however arg1=$1
outputs
'/mnt/pathfinder/contexts/chase/software/util/scripts/perception/movingObstacleDetection/training/cloud/buildTrainTestForMOD2.py
So it appears to be splitting on whitespace instead. In a terminal shell (the default version with Ubuntu 18.04) I get the expected parameter expansion with $1
.
What am I missing?