Hi Guys
I am facing a problem:wall:
In searching a string in a file and to add another string(ie. passed through command line argument) just after this(searched) string in new line.
Thanks
x="string_to_add"
sed "s/string_string/& $x /g" inputfile
In nawk ..
$ nawk '{sub(/search_string/,"&\nnew_string")};1' infile