示例:在每行末尾添加单词:
line1 abcdefg done line2 abcdefg done line3 abcdeft done
awk 'NF{print $0 " done"}' inFile
或者使用内联标志:
sed -i.bak '!/[^[:blank:]]/s/$/ done/' inFile