yenigallaamith_6778

Passing variable from Automic to Unix script

Discussion created by yenigallaamith_6778 on Sep 22, 2015
Latest reply on Sep 22, 2015 by Jennifer_Jinhong_34
Hello Automic experts,

I am a newbie learning Automic, and need some guidance with syntax.  I am trying to pass two parameters into a shell script. (Username and Password).  I have setup the two parameters in the process tab like below:

:SET &USERNAME# = 'ABC'
:SET &PASSWORD# = 'ABC'

In my shell script when I have to call the username and password as parameters, should the syntax be like &USERNAME or &USERNAME# or '$USERNAME'.

Below is sample code of what I am trying to do in my shell script, and as you can see, I need to pass in Username and password.  I don't want to hardcore the values in shell script, so instead I want to create them as parameters/variables in Automic and pass them to the shell script.

${JAVA_HOME}/bin/java  -cp "${CLASSPATH}" ${MEM_ARGS} org.service.wrapper.FileDownloader ${XYZ_ROOT}/download/ '$USERNAME' '$PASSWORD' $* New ${XYZ_ROOT}/extract

Please advise.

Thanks in advance!

Outcomes