test.sh: 4: Bad substitution
yuheyuan opened this issue · 1 comments
yuheyuan commented
Hello,I follow your test.sh
run
sh test.sh work_dirs/211108_1622_gta2cs_daformer_s0_7f24c
Then it occour
test.sh: 4: Bad substitution
ailab@ailab:/media/ailab/data/yy/DAFormer$ sh test.sh work_dirs/211108_1622_gta2cs_daformer_s0_7f24c
test.sh: 4: Bad substitution
here is the test.sh
#!/bin/bash
TEST_ROOT=$1
CONFIG_FILE="${TEST_ROOT}/*${TEST_ROOT: -1}.json"
CHECKPOINT_FILE="${TEST_ROOT}/latest.pth"
SHOW_DIR="${TEST_ROOT}/preds/"
echo 'Config File:' $CONFIG_FILE
echo 'Checkpoint File:' $CHECKPOINT_FILE
echo 'Predictions Output Directory:' $SHOW_DIR
python -m tools.test ${CONFIG_FILE} ${CHECKPOINT_FILE} --eval mIoU --show-dir ${SHOW_DIR} --opacity 1
DO you have some ways to solve it.