一个bash命令输出这个: Runtime Name: vmhba2:C0:T3:L14 Group State: active Runtime Name: vmhba3:C0:T0:L14 Group State: active unoptimized Runtime Name: vmhba2:C0:T1:L14 Group State: active unoptimized Runtime Name: vmhba3:C0:T3:L14 Group State: active Runtime Name: vmhba2:C0:T2:L14 Group State: active 我想pipe它到一些东西,使其看起来像这样: Runtime Name: vmhba2:C0:T1:L14 Group State: active Runtime Name: vmhba3:C0:T3:L14 Group State: active unoptimized Runtime Name: vmhba2:C0:T2:L14 Group State: active […] 即删除所有其他换行符 […]
我可以使用日志分析器,但是我经常需要parsing最近的Web日志来看看目前发生了什么。 我有时会做一些事情,比如找出要求某个文件的前10位 cat foo.log | grep request_to_file_foo | awk '{print $1}' | sort -n | uniq -c | sort -rn | head 你在工具箱里有什么?