hey guys,
I have a cfg file that needs updating a but I'm being lazy and want to script it.
I have a little Linux experience but I'm new to both sed and awk.
this is what I have so far (after spending some time on google and sed's man pages) but it's not adding the new string...
Any ideas what I'm doing wrong?
Thanks in advance
I have a cfg file that needs updating a but I'm being lazy and want to script it.
I have a little Linux experience but I'm new to both sed and awk.
this is what I have so far (after spending some time on google and sed's man pages) but it's not adding the new string...
Code:
sed '/string to find in file/ a\
new line and string to insert' mycfgfile
Any ideas what I'm doing wrong?
Thanks in advance