Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Hannu E K Nevalainen \(garbage mail\)" To: Subject: RE: env :xargs no such file or directory Date: Mon, 26 May 2003 09:34:22 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 > From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf > Of Vikram Mehta > I am on cygwin > If the code of given below script is run , I get an error > env: xargs no such file or directory found > This error comes form the last line of the code. > > f [ -f "$$ROMFSDIR/bin/busybox" ]; then \ > inode=`ls -i $$ROMFSDIR/bin/busybox | awk '{print $$1}'`; \ > ls -i "$$ROMFSDIR/bin" | grep "^ *$$inode" | awk '{print $$2}' | \ > sed "s:^:$$ROMFSDIR/bin/:" | env -i xargs rm -f; \ > fi > > What I cannot understand is what is the phrase > env -i xargs rm -f doing. $ info env > What may be the reason for the error and how canI remove it > > env works > and xargs also works but this does not work $ env -u PATH echo HEY env: echo: No such file or directory $ env echo HEY HEY $ env -i echo HEY env: echo: No such file or directory $ env -i /bin/echo HEY HEY $ uname -a CYGWIN_NT-5.0 P450 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown unknown Cygwin Seems to me that there is some PATH problem or so... "-i" removes all export/set variables, including PATH. Thus 'env' can't find commands. To temporarily 'fix' the above script; remove '-i' option from 'env' - or maybe remove 'env -i' and leave just xargs, or ... | env PATH=/bin xargs rm -f $ echo TEST 1 2 3 | env -i PATH=/bin xargs echo HEY HEY TEST 1 2 3 /Hannu E K Nevalainen, Mariefred, Sweden, 59o14'N, 17o12'E. 25o C yesterday. --END OF MESSAGE-- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/