BEGIN{
p_id="";
id="";
p_date="";
}
/^ *[0-9]/{
p_id=id;
id=$2
}
/^ Time/{
if ($2" "$3 != p_date) {
if (p_date != ""){
printf("last record of %s: %d\n",gensub(/start:/,"","1",p_date),p_id)
printf("1st record of %s: %d\n",gensub(/start:/,"","1",$2)" "$3,id)
}
p_date=$2" "$3
}
}
※ 引述《nashsai (纳许赛)》之铭言:
: Hi
: 我有一个文件为
: