여러 환경 변수 $VAR이 포함된 큰 문자열의 평가를 다른 환경 변수에 어떻게 저장할 수 있습니까?

여러 환경 변수 $VAR이 포함된 큰 문자열의 평가를 다른 환경 변수에 어떻게 저장할 수 있습니까?

왜냐하면nohup 명령에 대한 인증이 실행되는지 확인해야 합니다.여기에 문자열로 실행하려면 실제 명령을 입력해야 합니다.

nohup sh -c 'echo $SU_PASSWORD | /afs/cs/software/bin/reauth; python -u $RUN_CMD' > $PWD/nohup.out$SLURM_JOBID &

$RUN_CMD문자열을 생성하고 다음과 같은 변수에 저장해 보았습니다 .

export RUN_CMD='${!HOME}/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py --manual_loads_name diversity_ala_task2vec_delauny > $OUT_FILE 2> $ERR_FILE'

그러나 나는 그것을 작동시킬 수 없습니다. 어떻게 해야 합니까? 내 시도:

(metalearning_gpu) brando9~ $ export RUN_CMD='${!HOME}/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py --manual_loads_name diversity_ala_task2vec_delauny > $OUT_FILE 2> $ERR_FILE'
(metalearning_gpu) brando9~ $ echo $RUN_CMD
${!HOME}/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py --manual_loads_name diversity_ala_task2vec_delauny > $OUT_FILE 2> $ERR_FILE
(metalearning_gpu) brando9~ $ export RUN_CMD=$(echo '$HOME/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py --manual_loads_name diversity_ala_task2vec_delauny > $OUT_FILE 2> $ERR_FILE')
(metalearning_gpu) brando9~ $ echo $RUN_CMD
$HOME/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py --manual_loads_name diversity_ala_task2vec_delauny > $OUT_FILE 2> $ERR_FILE
(metalearning_gpu) brando9~ $ export RUN_CMD=$(echo '${!HOME}/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py --manual_loads_name diversity_ala_task2vec_delauny > $OUT_FILE 2> $ERR_FILE')
(metalearning_gpu) brando9~ $ echo $RUN_CMD
${!HOME}/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py --manual_loads_name diversity_ala_task2vec_delauny > $OUT_FILE 2> $ERR_FILE
(metalearning_gpu) brando9~ $ export RUN_CMD=(eval '$HOME/diversity-for-predictive-success-of-meta-learning/div_src/diversity_src/experiment_mains/main_diversity_with_task2vec.py --manual_loads_name diversity_ala_task2vec_delauny > $OUT_FILE 2> $ERR_FILE')
(metalearning_gpu) brando9~ $ echo $RUN_CMD
eval

관련된:

관련 정보