This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: env :xargs no such file or directory

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

Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter:
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:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]