一下操作会输入到文件末尾,,测试不全面,还不如使用echo解决呢。。。

1. 要添加的文本内容如下:

文件名:code_list


html</>!@$%^^

fdsafds

<>fdsf

?geg

!fdfd"f

 

2. 文本内容如下:

文件名:test.txt

test
fegege

agea

..2134#%$%

</head>

</html>

<html>

3. 将code_list 内容 添加到 test.txt文件的   </html>后面,代码如下所示

awk '/<\/html>/{system("cat code_list")}'   test.txt >> test.txt

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2021-12-03
相关资源
相似解决方案