#!/bin/sh#Parameter Checkif [ $# -ne 1 ]; then echo "Usage: `basename $0` newIp" echo "Examples:" echo " `basename $0` 172.60.0.128" exit 1fi
JNLP_NAME="runClient.jnlp"TEMP_NAME="temp.jnlp"IP_REGR="[0-9]/{1,3/}.[0-9]/{1,3/}.[0-9]/{1,3/}.[0-9]/{1,3/}"SED_PARAM='s/'${IP_REGR}':/'$1':/g'
echo $1 | grep "^"${IP_REGR}"$" > /dev/nullif [ $? -ne 0 ]; then echo "Usage: `basename $0` newIp" echo "Examples:" echo " `basename $0` 172.60.0.128" exit 1fi
#reconfig ip to temp filesed ${SED_PARAM} ${JNLP_NAME} > ${TEMP_NAME}
#remove JNLP filerm -f ${JNLP_NAME}
#rename temp file to JNLP Filemv ${TEMP_NAME} ${JNLP_NAME}