how to write finding output to same file using awk command

前端 未结 6 1492
无人及你
无人及你 2021-01-31 15:46
awk \'/^nameserver/ && !modif { printf(\"nameserver 127.0.0.1\\n\"); modif=1 } {print}\' testfile.txt

It is displaying output but I want to wri

6条回答
  •  伪装坚强ぢ
    2021-01-31 16:16

    Try to include statement in your awk file so that you can find the output in a new file. Here total is a calculated value.

    print $total, total >> "new_file" 
    

提交回复
热议问题