#!/usr/bin/ksh
if [ $# -ne 1 ]; then
echo " Usage: env_chk.sh <log_file> "
echo " ex. env_chk.sh env_variables.log "
exit 1
fi
base_param=${1}
if [ -f ${base_param} ]
then
continue
else
env >> ${base_param}
ulimit -a >> ${base_param}
schedo -aF >> ${base_param}
vmo -aF >> ${base_param}
no -aF >> ${base_param}
fi
current_param="${1}_`date +\"%Y%m%d%H%M%S\"`"
env >> ${current_param}
ulimit -a >> ${current_param}
schedo -aF >> ${current_param}
vmo -aF >> ${current_param}
no -aF >> ${current_param}
compare_result=`diff ${base_param} ${current_param} | wc -l`
#echo ${compare_result}
if [[ ${compare_result} -ne 0 ]]
then
echo 'parameters are changed... backing up the current variables...'
echo '#ftp.sh .... '
echo 'updating base param....'
cp ${current_param} ${base_param}
# exit
else
echo 'parameters are not changed... moving to next check'
# exit
fi
#echo "removing current param"
rm ${current_param}
'IBM Power' 카테고리의 다른 글
SEA 구성 및 설정 #1 (vios가 하나 일 경우...) (0) | 2012.07.03 |
---|---|
LPM (Live Partition Mobility) 가 않될 경우... 체크 사항... (0) | 2012.07.03 |
ftp.sh (0) | 2012.06.28 |
awk 활용 구문 정리 (0) | 2012.06.28 |
diff 와 sdiff (문자열비교) (0) | 2012.06.28 |