tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ Last argument or pid???

Date function ▻

How to find/install a binary?

In article <38015C53.CB84290B@yahoo.com>,
Kurt Voelker  <email4kurt@yahoo.com> wrote:
>1. How do you tell if a command exists on unix?  Will 'whereis' work?
>Or does that only tell if the command exists on your 'search path'.

Yes (to the last question).

>                                                                     Is
>there a way to tell if such a command exists on your system?

Ask the system administrator :-).

But if it's not in the path set up by your site's standard shell
initialization files, it's a fair bet it hasn't been installed.

>2. If a command doesn't exist on your system, how do you download it and
>get it up and running from your own account?  That is, where do you put
>it in your own set of directories and how do your reference it from your
>scripts?  (Given that you have enough disk space)

For programs built under `autoconf' (including almost all GNU tools,
such as `wget'), set the `prefix' to your home directory, like this.

    sh configure --prefix=$HOME

Then when you `make install', binaries will be put in $HOME/bin, manual
pages in $HOME/man/man*, etc.  Of course, you'll want to have $HOME/bin
in your PATH.

Tim.
--
Tim Goodwin   | "People think [ W. Gibson is ] hi-tech because his prose
Leicester, UK | is as pleasant to read as a C++ program." -- JT

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: How to find/install a binary? (...Command not found)
Date: 13 Oct 1999 16:18:17 +0100
Organization: University of Leicester, UK
Message-ID: <7u27sf$bgd$1@ltpcg.star.le.ac.uk>
References: <38015C53.CB84290B@yahoo.com>

△ comp.unix.shell △

◅ Last argument or pid???

Date function ▻