Hi.
I need help with this little problem, I'm running it on a Linux box.
Lets say a have a textfile that looks like
1
2
3
4
5
6
7
8
what I want to do is search for line 5 and then a something between line 5 and 6
Like sed 's/5/\nSometext/g file.txt
and then the output will look like
1
2
3
4
5
Sometext
6
7
8
But I can't figure out the newline stuff, \n works in perl,C on more but how can I do it i Sed
Thanks
I need help with this little problem, I'm running it on a Linux box.
Lets say a have a textfile that looks like
1
2
3
4
5
6
7
8
what I want to do is search for line 5 and then a something between line 5 and 6
Like sed 's/5/\nSometext/g file.txt
and then the output will look like
1
2
3
4
5
Sometext
6
7
8
But I can't figure out the newline stuff, \n works in perl,C on more but how can I do it i Sed
Thanks