It would really help if you would clearly state what it is that you are trying to accomplish.
In any case, a guess: With regard to POSIX, GNU/Linux sed is a mess. GNU goes beyond compatible extensions and happily disregards basic command behavior (most notably, the N command). If you are trying to append text, use a newline after the backslash after the a command.
sed '1731a\
####' squid.conf'
If you are not attempting to add a line of "####" after the 1731st line, then please explain further.
Absolutely no point. Anything that could possibly be special to the shell is already protected by strong quotes (single quotes).
Regards,
Alister
---------- Post updated at 09:22 PM ---------- Previous update was at 09:17 PM ----------
That command line will most likely just throw an error. You can't have whitespace around the "=" in an assignment.
Why don't you do yourself and us a favor and walk us through what it is that you are trying to accomplish. Step by step. Assume nothing. Break it down. Give us a few lines of input and the expected output. If you are trying to assign or extract something into a variable, give us context.