Cool this seems to work. The problem I have now is that the string I am trying to insert contains the ' character which conflicts with the
sed '1i\ line. Ordaniril they get ignored.
If I try to escape this string:
sed '1i\
EXEC PR_DbConfigStart \'test.txt\', \'10\', \'DESCRIPTION\' \
GO ' < $FILENAME > $TMPFILENAME
I get this error
syntax error at line 8 : `'' unmatched
if I try to build the string in an environment variable and rely on substitution, the string does nt seem to get substituted.
DBCONFIGSTART="EXEC PR_DbConfigStart 'test.txt', '10', 'DESCRIPTION' \nGO"
sed '1i\
$DBCONFIGSTART ' <test2.txt
producing this output
$DBCONFIGSTART
rest of file text.
Does anyone have any ideas how I can resolve this