我有一个 awk 命令克什脚本中,该命令从日志文件中提取字段,然后在新的文件中构造它们。
ultimate=$(grep -oP 'Time:\K.*' $log2 | column -t | awk '{print $3,"/","'"$month"'","/",$2,";",$4,";","'"$fBrand"'",";",'"$fUser"'",";","'"$fSerial"'",";","'"$fEmail"'",";","'"$fLocation"'",";"}' | sort | sed 's: ::g')
当我执行脚本时,它返回给我:
awk: cmd. line:934: 22",";","[email protected]",";","fn,",";"
awk: cmd. line:934: ^ invalid char '@' in expression