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

Re: Shell - escapes



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, May 10, 2016 at 01:36:22PM +0000, Andy Smith wrote:
> 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

"There Is More Than a Way To Do It" :-)

By the way, this is recommended reading (back to the shell and
especially bash):

  http://wiki.bash-hackers.org/

Enjoy
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlcx538ACgkQBcgs9XrR2ka7GgCfd2N8PaoE2ng7i4hPuASpH+up
/6IAmwSHaxmQVI9f9s3DhJAmARPHoPVw
=k8A/
-----END PGP SIGNATURE-----


Reply to: