delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/26/03:36:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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\)" <garbage_collector AT telia DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: env :xargs no such file or directory
Date: Mon, 26 May 2003 09:34:22 +0200
Message-ID: <NGBBLLIAMFLGJEOAJCCECEAODAAA.garbage_collector@telia.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
In-Reply-To: <Law14-OE51uTeC1oOJe0000e3e8@hotmail.com>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019