http://qs1969.pair.com?node_id=1074513


in reply to Re^4: Splitting up quoted/escaped command line arguments
in thread Splitting up quoted/escaped command line arguments

That's ok with me, because in Linux-ese (bash/sh/ksh), you can't escape a single quote. It's one of the most annoying things and I find it reeeally bothersome. This is why I don't try to accommodate for a "\'" sequence in update 4. Despite the fact that I don't want these commands to go to the shell, they are being written by people who deal with the shell almost exclusively: system admins. This much I can assume: that they won't be putting in commands that have syntax which outright fails to run on its own.

Tommy
A mistake can be valuable or costly, depending on how faithfully you pursue correction

Replies are listed 'Best First'.
Re^6: Splitting up quoted/escaped command line arguments
by choroba (Cardinal) on Feb 11, 2014 at 21:27 UTC
    Yes, you can escape a single quote - outside single quotes.
    $ echo 'a'\''b' a'b
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

      ...But that's just pure evil =D

      Tommy
      A mistake can be valuable or costly, depending on how faithfully you pursue correction
        Welcome to the shell. Expansion of variables and word splitting in bash are some of the reasons to love Perl.
        لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ