linux sed的一些技巧 sed -i '$a # This is a test' regular_express.txt 由於 $ 代表的是最后一行,而 a 的动作是新增,因此该文件最后新增『# This is a test』!