Subject: Re: Surprising xargs behavior on Solaris 10
To: Stefan Bethke <stb@lassitu.de>
From: John Nemeth <jnemeth@victoria.tc.ca>
List: tech-pkg
Date: 08/31/2005 11:49:20
On Jan 21, 11:17am, Stefan Bethke wrote:
}
} I ran into some trouble trying to build devel/tcllib:
} 
} ===> Extracting for tcllib-1.7
} ===> Required installed package tcl>=8.4.7nb1: tcl-8.4.11 found
} ===> Patching for tcllib-1.7
} => Fixing hardcoded ftp binary
} usage: rm [-fiRr] file ...
} *** Error code 2
} 
} The Makefile contains this:
} post-patch:
}          @${FIND} ${WRKSRC} -name \*.orig | ${XARGS} ${RM}
} 
} Apparently, there are no .orig files, but on Solaris, /usr/bin/xargs  
} (as well as /usr/xpg6/bin/xargs) still runs rm, just without any args?!
} 
} # uname -a
} SunOS dogbert 5.10 Generic_118822-08 sun4u sparc SUNW,Sun-Fire-V210
} # </dev/null xargs echo foo
} foo
} #
} 
} My FreeBSD system at home does the proper thing (I believe):
} $ uname -a
} FreeBSD diesel.lassitu.de 5.4-STABLE FreeBSD 5.4-STABLE #2: Sat Jun   
} 4 15:51:17 CEST 2005     root@diesel.lassitu.de:/usr/obj/usr/src/sys/ 
} DIESEL  i386
} $ </dev/null xargs echo
} $

     I wonder what the standards have to say since:  

vtn1% </dev/null xargs echo foo
foo
vtn1% which xargs
/opt/gnu/bin/xargs
vtn1% xargs --version
GNU xargs version 4.1
vtn1% uname -a
SunOS vtn1 5.8 Generic_117350-25 sun4u sparc

}-- End of excerpt from Stefan Bethke