我正在尝试使用 bash 脚本使用 File2.conf 中的文本更新 File1.conf。
~/.group/File1.conf
group b = bill john
group a = bill amy john
./File2.conf
group b = bill amy cara mike joe
group c = bill steven mike larry
导致 ~/.group/File1.conf 看起来像
group b = bill amy cara mike joe
group a = bill amy john
group c = bill steven mike larry
我一直在看,awk但sed似乎无法得到正确的输出。唯一的常数是group $ =和 间距。