쉘 스크립트(2)
-
UNIX SHELL PROGRAMING 2
http://ecl.informationbuilders.com/iway/index.jsp?topic=%2Fshell_60%2Fservice.manager%2Fsource%2Ftopic208.htm TELNET SHELL SCRIPT #!/bin/sh #+------------------------+ #| EMR FILE DELETE | #+------------------------+ host=100.10.10.100 user="scott" pass="tiger" cmd="rm -rf /cvs/dpp/emr/ERP/*" ( echo open ${host} sleep 2 echo ${user} sleep 2 echo ${pass} sleep 2 echo ${cmd} sleep 2 echo exit ) | ..
2013.05.21 -
UNIX SHELL PROGRAMING 1
출 처 : http://delfa.blog.me shell, kill, while, for, if # # 입력 string을 포함하는 프로세스 죽이기 for pno in `ps | grep $1 | grep -v "grep"` do echo $pno kill -9 $pno done # # 입력한 시간까지 10분 간격으로 명령어 수행하기 if [ "$1" = "" ]; then end="2300"; else end=$1; fi while : do tim=`date +"%H%M"` echo `date +"%Y-%m-%d %H:%M:%S"` if [ "$tim" -ge "$end" ]; then ( cd {directory} {command1} {command2} ) exit fi sleep 600 done ..
2013.05.21