[hackers] [sbase] xargs: Don't print trailing spaces when -t is set || sin
commit 2fc73e410c13ef5ea8157b9654b76efd2c6e0e1e
Author: sin <sin_AT_2f30.org>
Date: Tue Apr 21 17:59:08 2015 +0100
xargs: Don't print trailing spaces when -t is set
diff --git a/xargs.c b/xargs.c
index 92e0745..f64400c 100644
--- a/xargs.c
+++ b/xargs.c
_AT_@ -160,12 +160,15 @@ static void
spawn(void)
{
int savederrno;
+ int first = 1;
char **p;
if (tflag) {
for (p = cmd; *p; p++) {
+ if (!first)
+ fputc(' ', stderr);
fputs(*p, stderr);
- fputc(' ', stderr);
+ first = 0;
}
fputc('\n', stderr);
}
Received on Tue Apr 21 2015 - 19:00:52 CEST
This archive was generated by hypermail 2.3.0
: Tue Apr 21 2015 - 19:12:27 CEST