How to escape single quotes within single quoted strings

If you really want to use single quotes in the outermost layer, remember that you can glue both kinds of quotation. Example: alias rxvt=”urxvt -fg “”‘”‘#111111′”‘”‘ -bg ‘”‘”‘#111111′”‘” # ^^^^^ ^^^^^ ^^^^^ ^^^^ # 12345 12345 12345 1234 Explanation of how ‘”‘”‘ is interpreted as just ‘: ‘ End first quotation which uses single quotes. … Read more

Correct Bash and shell script variable capitalization

By convention, environment variables (PAGER, EDITOR, …) and internal shell variables (SHELL, BASH_VERSION, …) are capitalized. All other variable names should be lower case. Remember that variable names are case-sensitive; this convention avoids accidentally overriding environmental and internal variables. Keeping to this convention, you can rest assured that you don’t need to know every environment … Read more

Why does shell ignore quoting characters in arguments passed to it through variables? [duplicate]

Why When the string is expanded, it is split into words, but it is not re-evaluated to find special characters such as quotes or dollar signs or … This is the way the shell has ‘always’ behaved, since the Bourne shell back in 1978 or thereabouts. Fix In bash, use an array to hold the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)