jiaotong_1

#!/bin/bash
#cur_files=$(sshpass -p “admin” ssh 192.168.31.98 “find /userdata/outputResult -type f ( -iname *.jpeg -o -iname *.png -o -iname *.gif ) | wc -l”)
rm /home/tb/outputResult/.
all_time=1.5
i=1
while true
do
#if (( ( e c h o " (echo " (echo"{all_time} < KaTeX parse error: Expected 'EOF', got '#' at position 25: …}" | bc -l) )) #̲then start_time…(date +%s.%N)

pre_files=$(find /home/tb/outputResult/ -type f ( -iname *.jpeg -o -iname *.png -o -iname *.gif ) | wc -l )

sshpass -p “admin” scp -p -r 192.168.31.97:/userdata/outputResult_1/* /home/tb/outputResult

cur_files=KaTeX parse error: Can't use function '\(' in math mode at position 38: …esult/ -type f \̲(̲ -iname \*.jpeg…ins_files | xargs rm"
ins_files=$((cur_files-pre_files))
echo $pre_files
echo c u r f i l e s e c h o " s c p n u m s : cur_files echo "scp_nums: curfilesecho"scpnums:ins_files"
sshpass -p “admin” ssh 192.168.31.97 "ls -tr1 /userdata/outputResult_1/* | head -n i n s f i l e s ∣ x a r g s r m " e n d t i m e = ins_files | xargs rm" end_time= insfilesxargsrm"endtime=(date +%s.%N)
duration=$(echo “scale=3; $end_time - $start_time” | bc)
echo "Task $i took KaTeX parse error: Expected 'EOF', got '#' at position 14: {duration}s" #̲start_time=(date +%s.%N)
#end_time=KaTeX parse error: Expected 'EOF', got '#' at position 15: (date +%s.%N) #̲duration=(echo “scale=3; $end_time - $start_time” | bc)
#fi

输出执行时间

end_time= ( d a t e + d u r a t i o n = (date +%s.%N) duration= (date+duration=(echo “scale=3; $end_time - s t a r t t i m e " ∣ b c ) e c h o " r u n t i m e : start_time" | bc) echo "runtime: starttime"∣bc)echo"runtime:duration”
sleep $(echo "scale=3; $all_time - d u r a t i o n " ∣ b c ) e n d t i m e = duration" | bc) end_time= duration"∣bc)endtime=(date +%s.%N)
duration=$(echo “scale=3; $end_time - s t a r t t i m e " ∣ b c ) e c h o " a l l t i m e : start_time" | bc) echo "alltime: starttime"∣bc)echo"alltime:duration”
done

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值