I have a line as below in a html file, shahar.push(['remoteUrl', 'staging.zazzercode.com']);Depending upon environment, I want to replace the remoteUrl value with sed command.eg, shahar.push(['remoteUrl', 'staging.zazzercode.com']);shahar.push(['remoteUrl', 'production.zazzercode.com']);I used sed -i '/remoteUrl/c\shahar.push(['remoteUrl','staging.zazzercode.com']);' predict.htmlIt works but removing single quotes over 'remoteUrl' and 'staging.zazzercode.com' causing html error. shahar.push([remoteUrl, staging.zazzercode.com]);So to be safe, I want to change sed command just to change the value between two single quotes after , in a line with remoteUrl.Or I want other sed options than What I knew to replace whole line but with single quotes. 
Replace value within single quotes in a line that contains certain word using sed command
shell script;sed;quoting
The problem is that bash is processing your command line before sed gets a hold of it.  In this case, the solutions is to change the outer quotes to double-quotes:sed -i /remoteUrl/c\shahar.push(['remoteUrl','staging.zazzercode.com']); predict.htmlThe issue was that bash performs quote removal before passing the command to sed.  In bash's eyes, your original command was a series of single-quoted strings and bash removed all the quotes.  In the version above, bash sees a single double-quoted string.  While bash removes those double-quotes before passing the string to sed, it leaves the inner single-quotes alone.