23,116
社区成员
发帖
与我相关
我的任务
分享
echo -n `awk '{ print $5; print $6 }' test.txt` | sed 's/$$ts=//'
awk 'BEGIN {FS="$"} {if ($11 >= "ts=2011-04-21 10:00:00 " && $11 <= "ts=2011-04-25 10:00:00 ") {print $0}}' test.txt
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-21 17:27:11 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-22 16:27:11 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-23 12:26:11 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-24 17:27:12 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-25 11:27:11 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=
[root@Han test]# awk 'BEGIN {FS="$"} {if ($11 >= "ts=2011-04-21 10:00:00 " && $11 <= "ts=2011-04-25 10:00:00 ") {print $0}}' test.txt
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-21 17:27:11 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-22 16:27:11 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-23 12:26:11 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=
$$callid=1303377714104-9470 $$thread=[http-99-Processor23] $$host=20.1.83.67 $$userid=root $$ts=2011-04-24 17:27:12 $$remotecall=[accountmanage] $$debuglevel=ERROR $$msg=