The first line is variable
ann hold quite complicated value. The reason I use the second line is because I don't want to change anything in the third line
col1content. To change replacement, I just need to change second line to other variable.
ann="<?php echo '<h2>'.views_get_view('frprev_ann')->get_title().'<\/h2>'; echo views_embed_view('frprev_ann'); ?>" col1content=`echo $ann` sed -i 's/r'$rownum'c1content/'$col1content'/g' templates/page--front.tpl.php
But when above command has been run, it result in error:
sed: -e expression #1, char 19: unterminated `s' command
If I change the first line to be
ann="testtext", everything running smoothly. And when change first line to be
ann="<?first second", it fails. using backslash also cannot help me.