[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:08:04PM +0200, Thomas Schmitt wrote:
> Hi,
> 
> tomas@tuxteam.de wrote:
> >    perl -e 'print '"'"'$ and a'"'"' '    # I don't want to use "
> 
> You were faster than me. :))
> 
> 
> > I.e. just use the '' where you need 'em
> 
> I actually do it vice versa:
> If purely literal text is intended, i use '' where possible and
> escape only '.
> 
> That's most safe because i do not have to ponder which character
> is interpreted and converted inside "" and which will stay as is.
> So it is also easy to program in C.

Good insight. This was my first cut as well, but I came from a
slightly different angle: starting from '...', what would an
automatic transformation look like?

> Have a nice day :)

same to you :-)

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

iEYEARECAAYFAlcxxbQACgkQBcgs9XrR2kb7cACfXYcRaA+YSDCLzaQCL6S8sJFw
b4wAni2zG9YVvh0LoCyn/GyWJ8xs6LgI
=/y2Z
-----END PGP SIGNATURE-----


Reply to: