linux下自动读取日志脚本

linux下自动读取日志脚本
# !/bin/sh
dttime = `date  -- date  " 1 days ago "   " +%Y-%m-%d " `
echo 
" Starting smg_cmpp3 smg_empp2 logs get "
sftp ihandy@
192.168 . 1.225   << EOF
cd 
/ home / ihandy / smgagent / smg_cmpp3 / logs
lcd 
/ home / ihandy / log - smg / cmpp3
get 
" *deliver.$dttime.* "
get 
" *submit.$dttime.* "
get 
" *report.$dttime.* "
cd 
/ home / ihandy / smgagent / smg_empp2 / logs
lcd 
/ home / ihandy / log - smg / empp2
get 
" *deliver.$dttime.* "
get 
" *submit.$dttime.* "
get 
" *report.$dttime.* "
EOF
exit
实现这个功能要在FTP服务器上设置自动登录,才能实现

你可能感兴趣的:(linux下自动读取日志脚本)