#!/bin/bash
time1=$(date +“%Y-%m-%d %H:%M:%S”)
echo ‘开始抓取日志……’
echo $time1
aliyunlog log get_log_all --project=“ali-yingxiao20-yingxiao2yewu” --logstore=$1 --query=“” --from_time=“$2 $3 +08:00” --to_time=“$2 $4 +08:00” --format-output=no_escape --jmes-filter=“join(‘\n’, map(&to_string(@), @))” > /data/zhangzheng/$1.txt
if [ ? − e q 0 ] ; t h e n e c h o ′