From: hackbard Date: Tue, 20 Oct 2015 14:27:51 +0000 (+0200) Subject: just pick the date, no sed exp X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75ff16bfeeaeda96ce4daa2aae20d4dab44840a6;p=outofuni%2Fbackup.git just pick the date, no sed exp --- diff --git a/bin/backupctrl b/bin/backupctrl index f96e2fb..792d57f 100755 --- a/bin/backupctrl +++ b/bin/backupctrl @@ -6,8 +6,7 @@ function detect() { IFS=$'\n' for psline in `ps -ef | grep [r]sync`; do ppid="`echo $psline | awk '{ print $2 }'`" - pptime=`echo $psline | \ - sed 's/.*[0-9] \([0-9][0-9]:[0-9][0-9]\) \?.*/\1/'` + pptime=`echo $psline | awk '{ print $5 }'` ppcmd="`echo $psline | \ sed 's/.*\(rsync .*\)/\1/'`" echo