Pattern: Unescaped '
in shell script
Issue: -
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 or switch quotes to avoid the problem.
Example of incorrect code:
echo 'Nothing so needs reforming as other people's habits.'
Example of correct code:
echo 'Nothing so needs reforming as other people'\''s habits.'
or
echo "Nothing so needs reforming as other people's habits."