01-31-2008
10,
0
Join Date: Apr 2007
Last Activity: 25 July 2016, 7:41 PM EDT
Posts: 10
Thanks Given: 0
Thanked 0 Times in 0 Posts
help with onliner
Hi
I want to insert a line after a line by searching for the last occurence for that. I have taken an already posted example.
Say in the following file
a.txt
------
adadfadafadf
adfadadf
cool dfadfadfadfara
adfadfadf
cool aaaaaaaaaaaaaa
hai how are you
I want to insert after the red line. With unix sed command we can do it, but i think it needs an temp file. Using Perl we can do it with out using temp file. Perl onliner perl -i -ne 'print ..................' file name will help.
Can some give me the exact command
Thanks in advance
Lijju Math