Pattern: Word is outside of quotes in shell script
Issue: -
There is no way to nest single quotes. However, single quotes can be placed literally in double quotes, so you can instead concatenate a single quoted string and a double quoted string.
Example of incorrect code:
# v---match--v
alias server_uptime='ssh $host 'uptime -p''
# ^^
This is the same thing as alias server_uptime='ssh $host uptime' -p
.
Example of correct code:
# v--match---v
alias server_uptime='ssh $host '"'uptime -p'"
# ^---match---^
This results in an alias with embedded single quotes.