【发布时间】:2015-03-04 18:03:31
【问题描述】:
我正在运行 awk 命令从日志文件中提取数据以使用以下命令计算过去 15 分钟的日志,现在我收到以下错误:
awk '$0>=$from' from=$(`date -u +"####<%d-%b-%Y %H:%M:%S o'clock GMT>"-15min`) test.log
错误:
date: 0551-402 Invalid character in date/time specification.
Usage: date [-u] [+"Field Descriptors"]
awk: 0602-562 Field $() is not correct.
The input line number is 1. The file is test.log.
The source line number is 1.
谁能看出问题出在哪里?
【问题讨论】:
-
去除多余的反抽