我试图在第48行的末尾添加-a:
sed -i -e 48's/$/-a &/' input
但是我在第49行得到-a
48: xyz 49: -a
预期输出:
48: xyz-a
喜欢这个:
sed '48s/$/-a/' input