SamahSohrab607228

encrypted passwords using &UC_JOBMD CMD - used in multi-line script?

Discussion created by SamahSohrab607228 on Jan 29, 2016
Latest reply on Feb 2, 2016 by Jennifer_Jinhong_34
Does anyone know if I can use the &UC_JOBMD CMD within a multi-line script ?

We've moved the majority of our processing into docker containers. I'm providing templates that allow for users to create a set of shell commands that will all get sent to the docker container. I was wondering if I could pass an encrypted password from my PromptSet to that command.

I've used the encypted password on a single line script
&UC_JOBMD CMD="script.sh &USER# &PASS#"


But now I want to use this type of command
set -o errexit -o nounset -o pipefail

cat << EndOfMessage | ${DOCKER_RUN} -i --name="${CONTAINER_NAME}" ${DOCKER_IMAGE} /bin/bash -s
set -o errexit -o nounset -o pipefail
!#####Please put your shell script below######
!######Make sure you escape dollar sign $######

VAR=SAMAH
env
new_script.sh &USER# &PASS# \$VAR

!##############################################
EndOfMessage


I don't know if I need to put the &UC_JOBMD CMD around the whole text? Or if there is another way?

Thanks
Samah

Outcomes