Hi,
I am writting a dynamic script to go to several hosts and i have hit a road block. I want to check and see if a directory exists on another server. I ask for the environment and I ask for the path. The path would be a "env" variable (ie. $COMMON_TOP). I try to run the following code and it only work on "PROD" but I would like it to also check on other local hosts/env's using ssh. Any suggestion? Here is a snippet of code.
print -n "\n What environment file copied from (PROD): "
read FRENV (ie. PROD)
FRLOWER=`echo $FRENV | tr '[:upper:]' '[:lower:]'`
FRUPPER=`echo $FRENV | tr '[:lower:]' '[:upper:]'`
case ${FRLOWER} in
"conv"|"train"|"patch"|"devl"|"intf")
FRHOST=p690lp4
;;
"prod")
FRHOST=p690lp1
;;
esac
print -n "\n Path to get file: " (ie. $COMMON_TOP)[\b]
read FRPATH
eval FRPATH="${FRPATH}" (ssh statement here????)
echo ${FRPATH} (OUTOUT -> /u2/oracle/prodcomn)
I am writting a dynamic script to go to several hosts and i have hit a road block. I want to check and see if a directory exists on another server. I ask for the environment and I ask for the path. The path would be a "env" variable (ie. $COMMON_TOP). I try to run the following code and it only work on "PROD" but I would like it to also check on other local hosts/env's using ssh. Any suggestion? Here is a snippet of code.
print -n "\n What environment file copied from (PROD): "
read FRENV (ie. PROD)
FRLOWER=`echo $FRENV | tr '[:upper:]' '[:lower:]'`
FRUPPER=`echo $FRENV | tr '[:lower:]' '[:upper:]'`
case ${FRLOWER} in
"conv"|"train"|"patch"|"devl"|"intf")
FRHOST=p690lp4
;;
"prod")
FRHOST=p690lp1
;;
esac
print -n "\n Path to get file: " (ie. $COMMON_TOP)[\b]
read FRPATH
eval FRPATH="${FRPATH}" (ssh statement here????)
echo ${FRPATH} (OUTOUT -> /u2/oracle/prodcomn)