I need to do a set of substitution within the text file E.g putting instead of following key string
#include "martini.itp"
3 another strings with accurate paths to the itp files
#include "../dir1/dir2/martini1.itp"
#include "../dir1/dir2/martini2.itp"
#include "../dir1/dir2/martini3.itp"
I have tried to realize it using below pattern which produced errors I guess because the characters like ../ should be isolated from sed statement using specified syntax.
sed -i 's/#include "martini.itp"/#include "../dir1/dir2/martini_v2.0_lipids_all_201506.itp"\n#include "../dir1/dir2/martini_v2.0_ions.itp"\n#include "../dir1/dir2/martini_v2.0_solvents.itp"/' topol.top
\