Subscribe to

Escape single quotes in bash

Some helpful instructions on Stuart Colville’s blog explain how to do this.

To produce e.g. abc'def, you need to enter

$echo 'abc'\''def'

The '\'' first closes the single quotes, then puts a literal (escaped) ' and then opens single quotes again.

Leave a Reply

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image