[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Shell - escapes



Hello,

On Tue, May 10, 2016 at 11:18:06AM +0200, Die Optimisten wrote:
> How can I escape a ' inside '...'
> e.g. perl -e 'print '$ and a' '    # I don't want to use "

You can't, so if it were me I would use one of perl's alternatives
for single-quoted strings, such as:

perl -e 'print q{$ and a} '

http://perldoc.perl.org/perlop.html#Quote-and-Quote-like-Operators

Cheers,
Andy

-- 
http://bitfolk.com/ -- No-nonsense VPS hosting

> The optimum programming team size is 1.
Has Jurassic Park taught us nothing?         — pfilandr

Attachment: signature.asc
Description: Digital signature


Reply to: