delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/26/03:14: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
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Michael A Chase <mchase AT ix DOT netcom DOT com>
Subject: Re: env :xargs no such file or directory
Date: Mon, 26 May 2003 00:14:02 -0700
Lines: 37
Message-ID: <pan.2003.05.26.07.14.01.851088@ix.netcom.com>
References: <Law14-OE51uTeC1oOJe0000e3e8 AT hotmail DOT com> <pan DOT 2003 DOT 05 DOT 26 DOT 07 DOT 04 DOT 27 DOT 701284 AT ix DOT netcom DOT com>
Mime-Version: 1.0
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Pan/0.14.0 (I'm Being Nibbled to Death by Cats!)
Cc: uclinux-dev AT uclinux DOT org

On Mon, 26 May 2003 00:04:29 -0700, Michael A Chase wrote:

> On Mon, 26 May 2003 10:37:50 -0700, Vikram Mehta wrote:
> 
>> 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.
> 
> The -i option to env discards the environment.  If $PATH isn't set, env
> doesn't know where to look for xargs and xargs won't know where to find
> rm.  Try /bin/xargs instead.  If you use /bin/rm, you probably won't need
> 'env -i'.

If you want your script to work in *NIX as well as Cygwin, use
'/usr/bin/xargs' instead of '/bin/xargs'.

As for what each command does, 'man' is your friend.  For example:

 man env
 man xargs
 man rm

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.



--
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