Let's face it: xargs default behaviour is not well-defined. It would
probably work with xprop output, where quotes are escaped, but it's
better not to risk. Also, we probably want to keep occasional spaces
on their places.
I believe that xargs implementation that doesn't implement -0 is unheard of.
On Thu, Mar 21, 2013 at 06:12:30PM +0100, Joseph BOUDOU wrote:
> xargs -0 isn't POSIX neither.
But anywhere with xargs installed probably has xargs -0
functionality (is there even an alternative implementation?) Other
implementations of echo are more likely, so conservatism makes sense
there.
Greetings.
On Thu, 21 Mar 2013 18:11:00 +0100 Alexander Sedov
wrote:
> xprop prints information in format PROPERTY(STRING) = "escaped string",
> which causes problem with repeated Ctrl-F: any non-ascii turns into
> \ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape
> string, pri
xargs -0 isn't POSIX neither.
--
Joseph BOUDOU
xprop prints information in format PROPERTY(STRING) = "escaped string",
which causes problem with repeated Ctrl-F: any non-ascii turns into
\ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape
string, printf(1) is used, getting information from xargs -0; without -0
xargs will try to
2013/3/21 Nick :
> On Thu, Mar 21, 2013 at 07:26:23PM +0400, Alexander Sedov wrote:
> Can this be done with printf? ISTR echo -en isn't posix, whereas
> printf is well defined.
You make a point.
On Thu, Mar 21, 2013 at 07:26:23PM +0400, Alexander Sedov wrote:
> xprop prints information in format PROPERTY(STRING) = "escaped string",
> which causes problem with repeated Ctrl-F: any non-ascii turns into
> \ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape
> string, echo -en i
xprop prints information in format PROPERTY(STRING) = "escaped string",
which causes problem with repeated Ctrl-F: any non-ascii turns into
\ooo\ooo, this later turns into \\ooo\\ooo, and so on. To de-escape
string, echo -en is used, getting information from xargs -0; without
-0 xargs will try to h