请您尝试以下
tac
。+
awk
的解决方案。
tac Input_file | awk 'FNR==1{sub(/}/,"content&")} 1' | tac
2nd solution: Using GNU sed
+ tac
here.
tac Input_file | sed '1 s/}/content&/' | tac