for example
sed "41a Port 22520" /etc/ssh/ssh_config
the result file does not change until-I is added.
Thank you. I"m always confused about this kind of stuff.
for example
sed "41a Port 22520" /etc/ssh/ssh_config
the result file does not change until-I is added.
Thank you. I"m always confused about this kind of stuff.
you don't necessarily need to add-I, it depends on your purpose.
as in your case, adding-I will modify the original file. In many cases, there is no need to modify the original file, so there is no need to add-I.
-I: directly modify the contents of the read file, rather than output from the screen.
man sed
you'll understand