-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC1011
John Gardner edited this page Dec 22, 2021
·
5 revisions
echo 'Nothing so needs reforming as other people's habits.'
echo 'Nothing so needs reforming as other people'\''s habits.'
or
echo "Nothing so needs reforming as other people's habits."
When writing a string in single-quotes, you have to make sure that any apostrophes in the text don't accidentally terminate the single-quoted string prematurely.
Escape them properly (see the correct code) or switch quotes to avoid the problem.
None.