バッチスクリプトを使用して、ファイルの段落の最後に行を挿入したいと思います。私のファイルでは、段落の最後の行が明確ではありません。「LoadModulenamemoduleName」という形式の変数です。
新しい行: "LoadModule new_module module / mod_newmod.so"
私のファイルinput.conf
abc def xyz
LoadModule foo_module libexec/mod_fooa.so
LoadModule proxy_module libexec/mod_proxy.so
LoadModule lmn_module libexec/mod_abc.so
LoadModule xyz_module libexec/mod_def.so
ExtendedStatus controls whether Apache will generate "full" status
結果:
abc def xyz
LoadModule foo_module libexec/mod_fooa.so
LoadModule proxy_module libexec/mod_proxy.so
LoadModule lmn_module libexec/mod_abc.so
LoadModule xyz_module libexec/mod_def.so
LoadModule new_module module/mod_newmod.so
ExtendedStatus controls whether Apache will generate "full" status
LoadModule段落の最後に新しい行「LoadModulenew_modulemodule/mod_newmod.so」が挿入されます。このための解決策を提案してください。ありがとうございます。