Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Shell quoting

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:42:06

Okay, I'm trying to put together some rules that should work across shells.

For byte values:

0		Hopeless - not representable in C strings
1-31,127	Prefix with ^V if (and only if!) entered at a prompt,
		as opposed to passed in the ssh command field
32-126		\-escape all characters except -+_@=:.,/ and
  		ASCII alphanumerics
128-		Don't escape (would have to be done differently
  		depending on locale, and shouldn't be needed)

Anyone know of a system for which that breaks horribly?  The 1-31,127 
stuff is iffy, but I just don't know of anything that's more reliable. 
Unfortunately \010-style quoting doesn't work in any of the common shells.

	-hpa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help