From owner-freebsd-current Sun Apr 22 3:56:47 2001 Delivered-To: freebsd-current@freebsd.org Received: from ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by hub.freebsd.org (Postfix) with ESMTP id 333B937B422 for ; Sun, 22 Apr 2001 03:56:35 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Received: from notebook.vega.com (dialup14-25.iptelecom.net.ua [212.9.229.89]) by ipcard.iptcom.net (8.9.3/8.9.3) with ESMTP id NAA86650; Sun, 22 Apr 2001 13:53:58 +0300 (EEST) (envelope-from sobomax@FreeBSD.org) Date: Sun, 22 Apr 2001 13:53:58 +0300 (EEST) Message-Id: <200104221053.NAA86650@ipcard.iptcom.net> To: brian@Awfulhak.org, kabaev@mail.ru Cc: sheldonh@uunet.co.za, brian@Awfulhak.org, freebsd@gndrsh.dnsmgr.net, bsd@bsdhome.com, schweikh@schweikhardt.net, freebsd-current@FreeBSD.org, brian@Awfulhak.org From: Maxim Sobolev Reply-To: sobomax@FreeBSD.org Subject: =?ISO-8859-1?Q?Re:_cp_-d_dir_patch_for_review_(or_'xargs'=3F)?= X-Mailer: Pygmy (v0.5.5) In-Reply-To: <200104211904.f3LJ4V547486@hak.lan.Awfulhak.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 21 Apr 2001 20:04:31 +0100, Brian Somers wrote: > > Sorry for butting in. Adding new non-portable functionality to solve the problem > > which could be adequitely taken care of using existing and well known > > techniquies is not appropriate, I completely agree with you on that. > > And I'm still waiting to see those well known techniques. Attached small script should solve this problem and doesn't require introducing incompatible option in the standard tool. For example: find /usr/src -type f | xargs larg cp targetdir For speed purposes it could be implemented in raw C. -Maxim #!/bin/sh if [ ${#} -le 2 ]; then echo "Usage: larg command lastarg arg1 [arg2 ...]" exit 0 fi COMMAND=${1} LASTARG=${2} shift 2 exec ${COMMAND} "${@}" "${LASTARG}" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message