sed -n ‘/Error/p’ | awk ‘{print $1}’ fresh.log 分开执行试试,先sed -n ‘/Error/p’再加上 awk ‘{print $1}’ fresh.log 执行。其实sed -n ‘/Error/p’这里就卡住了。
管道符