I want to turn off backslashing of quotes and such from the shell

G

Guest

I do something like:
result=`cat mess.html`
p result

and all my quotes in my html file are suddenly backslashed. Is there any way
to turn that off?

xc
 
A

Anthony Martinez

--LwW0XdcUbUexiWVK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,
=20
At Mon, 11 Jun 2007 11:47:01 +0900,

puts result

Or

print result

if you don't want an extra newline appended.
=20
--=20
Nobu Nakada
=20


--LwW0XdcUbUexiWVK
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFGbPSzKaiGM/xGKzQRAv7XAKCJH3EwjQhtVBXLhufUIkEHUPeZNQCdHWO9
sUzvb+ux0C9U4GR8Vy7fQd4=
=KlZo
-----END PGP SIGNATURE-----

--LwW0XdcUbUexiWVK--
 
G

Gregory Brown

Yeah, looks like I only get the backslashes inserted when I use "p"
instead of puts and print. Thanks.

That's a feature.

seltzer:~/devel/bazaar/EarGTD sandal$ irboo"
=> "foo\noo"foo
oo

p looks for the .inspect output, wheras puts uses .to_s
useful for debugging.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,261
Messages
2,571,308
Members
47,967
Latest member
pakasi

Latest Threads

Top