No clue. I just went by the description of the 'c' command in the man page, where it's indicated as
c \
text
as opposed to
s/regexp/replacement/
and tried it on one of our HP-UX machines (where sed complained if the newline wasn't there)
My guess would be that this was originally intended to preserve any whitespace at the start of the replacement text that otherwise might be ignored by the tokenizer.
Sorry to be a pain but I now want to use a variable instead of a line number in my script and I am getting nowhere fast with combinations of " and ' and `.
What would be the correct way to write
sed '$vLineNumberc\
replacement txt' $vfilename
(not forgetting the essential line return after the \)
Change each single quote to double quotes. Shell doesn't do variable substitution inside single quotes. Also, changing $vLineNumber to ${vLineNumber} can help.