---
name: "fhostcmd"
section: "1"
platform: "linux"
package: "fsp"
version: "2.81.b24-3"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/fhostcmd"
---

# fhostcmd(1)

set environment variables

## NAME

fhostcmd, fhost - set environment variables

## SYNOPSIS

**fhostcmd \[-d delay\] \[-p local port\] \[-l local directory\] \[-o timeout\]** \[-t trace\] \[-w password\] \[-f filename\] \[-h number \| name\] \[-c \| -b\] \[host port \[directory\] \| abbreviation\]

**fhost \[-d delay\] \[-p local port\] \[-l local directory\] \[-o timeout\]** \[-t trace\] \[-w password\] \[-f filename\] \[-h number \| name\] \[-c \| -b\] \[host port \[directory\] \| abbreviation\]

## DESCRIPTION

**fhost** uses a resources files to set all environmant variables needed to connect to a given host via FSP. If a -f option is given, the given filename is also used as resources file. **fhost** loads all available resource files. If server is defined in multiple files, first match is returned. Load order is *.fsp\_prof* in the current working directory and in the user's home directory. Then a system wide default file is used. If **fhost** is invoked with an abbreviation given, the resource files are searched for the first host to match this abbreviation. The values given for this host will be set.

If **fhost** is invoked with a given host and port number, this host will be used and no searching in the resource file will be done.

Setting up the host the user can change between using the host name or the internet address. In case only one is given and the other should be used **fhost** tries to find it using a built in mini-nslookup facility. The default is to use what is given and to use the number if both are given.

Since programs cannot change environment variables of their parent shell in a simple way, it is recommended that the user defines a shell alias or function to make it possible. **csh** example:

```
alias fhost 'eval `fhostcmd !*`'
```

## FSP\_PROF

For more information about the resource file confer *[fsp\_prof(5)](/fsp_prof/5.md).* Here's just a short example of how it works. If your resource file contains the following

```
host seismo.soar.cs.cmu.edu
fsp port 30
local directory ~/sources/fsp-266.1
trace off
```

a call of **fhost** seismo in **csh** will produce the following output to be evaluated

```
unsetenv FSP_TRACE;
setenv FSP_PORT 30;
setenv FSP_LOCAL_DIR ~/sources/fsp-266.1;
setenv FSP_HOST seismo.soar.cs.cmu.edu;
setenv FSP_DIR /;
```

## ARGUMENTS

**-d** -- set FSP\_DELAY to *delay*

**-p** -- set FSP\_LOCALPORT to *local port*

**-l** -- set FSP\_LOCAL\_DIR to *local directory*

**-o** -- set FSP\_TIMEOUT to *timeout*

**-t** -- set FSP\_TRACE if *trace* = *on,* unset it if *trace* = *off*

**-p** -- set FSP\_PASSWORD to *password*

**-f** -- use *filename* as resource file

**-b** -- output Bourne shell code

**-c** -- output C shell code

## ENVIRONMENT

The environment variables associate this program with a FSP database and are set (resp. unset) if needed. See [fsp\_env(7)](/fsp_env/7.md) for list.

## SEE ALSO

[fcatcmd(1)](/fcatcmd/1.md), [fcdcmd(1)](/fcdcmd/1.md), [fgetcmd(1)](/fgetcmd/1.md), [fgrabcmd(1)](/fgrabcmd/1.md), [flscmd(1)](/flscmd/1.md), [fmkdir(1)](/fmkdir/1.md), [fprocmd(1)](/fprocmd/1.md), [fput(1)](/fput/1.md), [frmcmd(1)](/frmcmd/1.md), [frmdircmd(1)](/frmdircmd/1.md), [fver(1)](/fver/1.md), [fducmd(1)](/fducmd/1.md), [fhostcmd(1)](/fhostcmd/1.md), [fspd(1)](/fspd/1.md), [fsp\_prof(5)](/fsp_prof/5.md), [ffindcmd(1)](/ffindcmd/1.md), [fsp\_env(7)](/fsp_env/7.md), [fspsites(5)](/fspsites/5.md)
