Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2012 22:52:26 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Fbsd8 <fbsd8@a1poweruser.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: fetch error
Message-ID:  <20120625225226.7a5c88db.freebsd@edvax.de>
In-Reply-To: <4FE8C72F.4040908@a1poweruser.com>
References:  <4FE8C72F.4040908@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 25 Jun 2012 16:16:47 -0400, Fbsd8 wrote:
> I think I messed up the fetch setting in the envelope.
> 
> Running 9.0 and get this console msg.
> 
> env: usr/bin/fetch: No such file or directory
> 
> When I enter env command to show all values I see nothing about fetch.

The "env" command is often used as a "bridge" to explicitely
call commands where the actual location is not known or cannot
be predicted, e. g.

	#!/usr/bin/env bash

at the start of a bash script instead of

	#!/bin/bash

Linuxism or when statically linked, as opposed to

	#!/usr/local/bin/bash

default location on FreeBSD.



In what operation do you receive the message? Maybe some typo
in a shell script or Makefile?

Examine closely:

	env: usr/bin/fetch: No such file or directory
	     ^

The leading / is missing, because "usr/bin/fetch" would only
exist when $CWD is /, otherwise not; "/usr/bin/fetch" should
be correct.

	% which fetch
	/usr/bin/fetch
	^

Here the correct path is provided. Maybe you ran into some script
that calls fetch the "bridge" way improperly?

Test:

	% env usr/bin/fetch
	env: usr/bin/fetch: No such file or directory

And now properly:

	% env /usr/bin/fetch
	usage: fetch [-146AadFlMmnPpqRrsUv] ............

It seems that env is used here to "set environment and execute
command"; see "man env" for details.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120625225226.7a5c88db.freebsd>